The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Use sub domains for temporary site access

Discussion in 'General Discussion' started by EliteIT, Mar 9, 2014.

  1. EliteIT

    EliteIT Registered

    Joined:
    Mar 9, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I provide web hosting to clients and am looking for an alternate method to the typical /http://SERVERIP/~username method for accessing a site before DNS has been updated.

    That method usually works but now I'm having web designers tell me that when they are trying to work on Wordpress sites before going live with them they are being directed to the actual domain name ex: domain.com when clicking on certain links inside the wordpress configuration, instead of staying on the temporary IP address link above. This is causing issues because the domain in question may be live on another server and it appears my server is doing a DNS lookup on the domain and redirecting rather than just staying on the temp link and navigating through that way.

    I am wondering if there is an easy way to setup sub domains to allow people to access their sites temporarily before switching DNS and going live. I basically want to follow the format subdomain.srvr3.domain.co (srvr3.domain.co is the host name of the server) for each new cPanel account I create.
     
  2. robb3369

    robb3369 Well-Known Member

    Joined:
    Mar 1, 2008
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    We do this all the time... Setup the client domain in WHM just like you would (clientsite.com) and then park your test subdomain on it (client.test-domain.com) either from cpanel or whm...

    This way once the site goes live, you'll basically remove the subdomain, run a wordpress specific search and replace tool /https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to update the db with the new hostname and then remove the SnR script from the server.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The easiest solution is to simply have the web designers update the hosts file on their machines so that the domain name resolves to the IP address of the server. This will allow them to view the website before the DNS is updated without using the Apache Mod_Userdir tweak.

    hosts (file) - Wikipedia, the free encyclopedia

    Thank you.
     
  4. dankoni

    dankoni Member

    Joined:
    Apr 4, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    GAH! Why didn't I think of this a week ago?! lol
     
Loading...

Share This Page