I just transfered my DNS to a new provider. I would love to change the default front page of drupal from the IP login address to the actual website address. Does anyone know how to do it?

Comments

dman’s picture

Drupal links are context-sensitive - unless you've hard-coded your site name in $base_url.

If you have a site that is currently accessed under an IP ... the rest of the links will be created under that IP also.
If you access the same site via the DNS hostname - you'll see links going there instead. From the same install. Drupal figures it out from how it was called.

Stop typing in the IP and enter the real name instead.

If that doesn't work, your DNS is not propogated yet. That means that even if you DID change the links to the domain name versions (it can be done - set $base_url in settings.php) it still wouldn't work as those pages cannot be found any more than the homepage could.
So don't do that.

You CAN however edit your personal machines HOSTS file to hard-code the domain-IP for testing while waiting for DNS to happen. Search for more info on that for your OS.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

arkady39’s picture

Thanks, a lot. I believe it is a propagation matter.

About $base_url in settings.php - I see quite a few $base_url entries in there one after the other. Which one exactly should I change and what should I change it to?

Thanks,

arkady39’s picture

When I put in my actual domain and try to log into drupal site through the members login as administrator I am redirected to the temp ip login page and I need to put my login information again. Only then I can be inside as administrator.
How do I eliminate this process of going through the IP link and going directly in one step into logging in. Is it a propagation issue or there is more to that?

vm’s picture

This issue that you describe isn't a drupal issue. This sounds like a host problem to me.

where is "temp ip login page" coming from? certainly not drupal.

dman’s picture

Talk to your host.

If you enter your domain into your browser, and end up looking at an IP address, your host has got some strange redirect in place. ... which may be clever and convenient, and may go away when propogation has finished.

Your 'members login' is all about your host, by the sound of things. Clarify with them.

vm’s picture

it helps tremendously to read the comments:

 * Examples:
 *   $base_url = 'http://www.example.com';
 *   $base_url = 'http://www.example.com:8888';
 *   $base_url = 'http://www.example.com/drupal';
 *   $base_url = 'https://www.example.com:8888/drupal';

The above, copied from settings.php are simply examples:

you want to find:

# $base_url = 'http://www.example.com';  // NO trailing slash!

remove the #, which will uncomment out that line and make allow it to be read.
then edit the line to reflect your sites address.

as previously stated by the other commenter if your address hasn't propogated yet, altering this line won't do anything for you.

ckleiman’s picture

I just had the same problem. I had Drupal installed in a sub folder under the root. When ready I migrated the site to the root and noticed the links were still referencing the sub folder. So, I followed your directions on modifying the settings.php file and it worked.

At first glance I wasn't sure how to make this modification easily and I was afraid I was going to have to do a fresh install. This saved me lots of pain and time.

I'm not a programmer and don't have a lot of interest in php programming, however, I realize Drupal is a very powerful CMS and some things are more difficult for non programmers. That said, as a newbie, I really appreciate the little hints like removing # to un comment the line and pointing in the right direction. I knew there had to be an easy way to do this. I just didn't know if it would be worth the time to research the solution on the forum or just do the fresh reinstall. Fortunately, I found your post quickly.

Many thanks, again!

priyanka raichand’s picture

what is DNS propagation? and whats its use in giving address to website.?

vm’s picture