Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Accessing site before DNS

  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    34

    Default Accessing site before DNS

    I'm trying to create a website in Wordpress before I turn it up in DNS (moving hosting providers).

    I can get to the site via mainsite\~newsite, but I can't do much with it since it expects everything to be related to the new host name.

    Any ideas?

  2. #2
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,647

    Default

    You'll have to configure Wordpress to use the preview URL and then revert it to the actual domain before making the DNS changes.

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Location
    Russia, Nizhny Novgorod
    Posts
    315

    Default

    Alternatively you can set up a record in the "hosts" file.

  4. #4
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,647

    Default

    Quote Originally Posted by ZYV View Post
    Alternatively you can set up a record in the "hosts" file.
    This is probably a much better idea as the preview URL doesn't play well with all PHP scripts and especially custom php.ini files that you create.

  5. #5
    Member
    Join Date
    Feb 2005
    Posts
    34

    Default

    Ah- I was reading your post about fooling the local DNS, ZYV. I'll try that.

    Hmm, didn't work. It still resolves to the 'old' site, even after reboot.
    Last edited by toecheese1; 01-25-2009 at 12:42 PM.

  6. #6
    Member
    Join Date
    Feb 2005
    Posts
    34

    Default

    I'm not able to do it with Fantasticso because I don't get a choice on the domain name to which it belongs. I might set up a fake domain (and use the hosts trick to make it resolve) and install it there- not sure how easy it is to 'move' a domain from 'fakedomain.com' to 'realdomain.com'. Guess I'll cross that bridge when I get to it.

  7. #7
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,647

    Default

    There are settings within the script that define the URL from which it operates. These can be changed after installation.

  8. #8
    Senior Member
    Join Date
    Mar 2004
    Location
    California
    Posts
    724

    Default

    I've done it two ways ... one is to change all the references to one URL to the temporary one. Sometimes that's not too hard, especially when the script references relative urls. But it can get troublesome if you have to install several scripts for a customer.

    In another case, I registered the .org version of the domain name and created the site for testing and to show the customer. When they were satisfied, I renamed all the URLs, we made the DNS changes and I submitted a ticket to Dathorn to change the domain to the .com version.

    Its still a lot of work, but it made for a nearly seamless transition.

  9. #9
    Senior Member
    Join Date
    Sep 2005
    Location
    Russia, Nizhny Novgorod
    Posts
    315

    Default

    It should work unless you did something wrong, I've been doing this stuff for ages. Make sure that you edited the correct file on your local machine (/etc/hosts or %WINDIR%\System32\drivers\etc\hosts) and the record you added on a separate line was like "123.45.67.89 host.com www.host.com". No reboot is needed. Use "nslookup host.com" to check how it resolves.

    BTW, if you want to go this fake domain way, you don't really need any transition at all. Just set up an account for your future domain and then park the fake domain there using "Add parked domain" in cPanel. You will be able to remove it seamlessly when you are done.

  10. #10
    Senior Member
    Join Date
    Mar 2004
    Location
    California
    Posts
    724

    Default

    Quote Originally Posted by ZYV View Post
    It should work unless you did something wrong, I've been doing this stuff for ages. Make sure that you edited the correct file on your local machine (/etc/hosts or %WINDIR%\System32\drivers\etc\hosts) and the record you added on a separate line was like "123.45.67.89 host.com www.host.com". No reboot is needed. Use "nslookup host.com" to check how it resolves.

    BTW, if you want to go this fake domain way, you don't really need any transition at all. Just set up an account for your future domain and then park the fake domain there using "Add parked domain" in cPanel. You will be able to remove it seamlessly when you are done.
    The HOSTS file trick is a good one for creating the site before the DNS records are changed, but it probably won't work to show your customer the site before hand-over. It could, but then you would have to make sure they re-edit it each time they visit their existing site, etc.

    In that case, ie. the customer reviewing the site, you still need to have the domain names in all the scripts changed. In most php scripts I'm using, its only in a few places anyway.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •