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

  • Answered
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 = ''; // 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?
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