Like many PHP based Content Managment Systems (CMS), Drupal depends on a working domain name. If you have a domain name that is not pointed to our Nameservers and you're not ready to point it at this time, you can install Drupal and test it through your Temporary URL with just a couple of changes.

First, let's see what happens to our Drupal site if we've installed it through Fantastico and try to view it through our temporary URL:


As you can see, it doesn't look like a normal Drupal installation. Additionally, if we try to log into the Drupal admin interface we receive a 404 error.


Editing the Drupal settings.php File

The first step in resolving this will be to log into cPanel where we will access the cPanel File Manager and edit our Drupal settings file.

Once you are logged into cPanel, click on the File Manager icon. Make sure you select the correct document root for site (Document Root For:) and select "Show Hidden Files (dotfiles)"


Next, navigate to the sites/default/settings.php file. Make sure you have the settings.php file selected (not the default.settings.php file).

Select either Edit or Code Editor to open the settings.php file for editing.


Either scroll down or do a search for the line that begins with $base_url. Note, there are several lines above this that provide examples of base_url, please make sure you are on the correct line.


Replace the value for the $base_url with your temporary URL.

For your main domain name, your temporary URL will be similar to this:

If you are working with an Addon domain, your temporary URL will be similar to this:

When you've finished replacing the $base_url value, this line will look like one of these two examples:

Main domain name:

$base_url = '';  // NO trailing slash!

Addon domain:

$base_url = '';  // NO trailing slash!

Click the Save Changes button and then close the file (Close button).

Edit the .htaccess file to use Drupal through the temporary URL

Next, we will need to edit the .htaccess file for your site.

Navigate back to the document root directory for your site (public_html for main domain or public_html/

Select your .htaccess file and click either Edit or Code Editor to open the file for editing.


Scroll down or do a search for this line:

# RewriteBase /drupal

Delete the # sign and space just after that symbol to un-comment the line and change /drupal as follows for either your main domain or an Addon domain:

Main domain:

RewriteBase /~userna5

Addon domain:

RewriteBase /~userna5/

Click the Save Changes button and close the file (Close button).

Now when you bring up your Drupal site through your temporary URL, the site appears correctly and you can log into your Drupal admin interface.



Once you have pointed your domain to our Nameservers and allowed 4-24 hours for DNS to propagate, you can disable the changes made above:

Change the $base_url value in settings.php back to your domain name:

$base_url = ''

If you have any questions about these changes or need any assistance, please feel free to submit a question to our Support Center.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Post a Comment

Email Address:
Are you a bot?

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

Update to SSL Certificates - Certificate Warnings
1969-12-31 11:00 am EST
Hits: 635
What is the Heartbleed bug?
1969-12-31 11:00 am EST
Hits: 261

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

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

Not a Customer?

Get web hosting from a company that is here to help.