How do I change the base URL in the Drupal settings.php file?

Category: Drupal 7

cgaldine
Asked:
2013-02-10 8:57 pm EST

Hits: 2,817
I added a domain to my hosting set up as a "parked domain" via the c-panel. The DNS settings for the URL are pointed at the correct IP.

Now, I am trying to set the base URL in the Drupal settings.php file to the correct url. See below:


* Base URL (optional).
*/
$base_url = 'http://website.example.edu'; // NO trailing slash



After I make the change to the base URL in the settings.php file, I can no longer log in to the Drupal site as an admin.

What am I doing wrong?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

Scott
Staff
19,427 Points
2013-02-11 11:31 am EST
Hello cgaldine,

In looking at the parked domain on your page, it appears to be set up correctly in cPanel. When visiting the site name, however, I get our base server page for that server.

Checking into the DNS records for the domain, we see it is pointing to the server name itself as a CNAME record. This can be problematic as that server has multiple IP addresses. This means that it may choose an IP address that your account is not attached to when trying to see the domain, causing the base server page to show instead of your actual page.

What you want to do is have the DNS manager set the record to point to your specific IP address for your account. You can find instructions on how to find your IP address from our article here.

Simply have the subdomain point to that IP address and it should then show the site correctly.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!