How do clients access site without DNS resolving?

jim.thornton

Verified User
Joined
Jan 1, 2008
Messages
334
Just curious. It is more for myself at this point but I need to know how to access a site before the DNS has resolved.

I'm working on migrating my site to my new VPS (DA) and I need to see if it is working. In cpanel (what I was using before) it is simply http://www.myhostingcompany.com/~myusernam that would access my site.

What is it with DA?
 
I tried that and it didn't work. I'm trying to access a domain that I added to my main admin profile. Right now I have 2 domains setup. How would I access let's name domain1.com?
 
Go into Domain Administration and set the domain you want to view as the default. Then go to the address I pasted above to view.
 
Some sites won't work that way because they contain references to the full URL in links, etc.

So we recommend you add a line to your desktop system's hostfile. If you use Linux, FreeBSD or Apple OS, then the file should be at /etc/hosts; it's a bit more complex in MSWindows; find it once and then put a link to it on your desktop <smile>.
Do it this way:
Code:
12.34.56.78<tab>www.example.com<tab>example.com
where of course you replace the reference to 12.34.56.78 with the desired IP#, example.com with your domain name, and <tab> with an actual tab character.

You may have to restart your browser. We create a link in each of our systems (the same way the squirrelmail and webmail links work) so that you can have a file at /var/www/html/whichserver.txt which will work for every domain, so you can see at a glance which server you're looking at.

Don't forget to remove the line from your hosts file when the domain has propagated. Otherwise if you ever move it to another IP# it will no longer work and you'll tear your hair out for about a week befoe you figure it out :D.

Jeff
 
Setting the default for each domain you have can be a bit time consuming if you have a lot of domains per account. Is there a quicker way to view other non default domains without having the DNS resolved?
 
Since I made that post DirectAdmin has begun offering an optional directory structure under which you can specify the domain name in the URL. I don't remember the details, but you can search these forums.

Jeff
 
Back
Top