How to fake the DNS IP lookup to test your website
By Kentent
- How does email work?
Email is not hard to work you just have to know what to do. - How to set up a wireless network
How to set up a wireless network, articles and resources
If you need to test out a website that you have created you can do so without having to worry about changing the DNS IP lookup. To test your website you are going to need to create a fake DNS IP lookup. Being able to create a fake DNS IP lookup is nice because you can make whatever changes are needed to your website and test it out with the real URL, without losing any of your information. The best thing about this process is it is not nearly as hard as it sounds, as long as you know stuff about computers.
When creating a fake DNS IP lookup what you are doing is changing where your website is pointed to, but only for yourself, you don't want others to be able to access the new website, you only want them to be able to access to the old website at the old IP address. For example, you want to change yourwebsite.com to point at 1.2.3.4 instead of 1.2.3.3.
To do this the first thing that you need to do is enter the "hosts" file in Windows. You need to do this because the text file is what contains the IP-to-name mappings that override DNS. To edit the hosts file you will need to go to c:\windows\system32\drivers\etc\hosts and add the following line to the appropriate text file 1.2.3.4 yourwebsite.com. Once you have done this, your machine will reference the new IP address, 1.2.3.4 for yourwebsite.com instead of whatever DNS was previous listed.
One thing that you need to keep in mind when doing this is that you are going to need an entry for every domain that you are testing. You will have to go into the hosts files and change each host file for the domain that you are testing; you will also need to change the host files for any subdomain that you are testing. For example, if you need to test yourwebsite.com and www.yourwebsite.com you will need to create two separate entries.
Once you have finished with your testing you must remember to remove the entries from your hosts files. The reason for this is that the hosts file is overriding DNS. What this means is that if at any time in the future the real IP Address for yourwebsite.com changes your machine will not recognize that change because the DNS IP lookup is being overridden in the hosts files and the machine will believe whatever is listed in the hosts.
While you are making the changes one thing that, you might be having a hard time. If you cannot make the changes one thing that you need to check is your anti-virus software or your anti-spyware programs. You need to check these because they can actually be preventing you from making the changes to your hosts file. The reason that they will prevent you from making the changes to your hosts files is because this technique is the same technique that is used by viruses and spyware. The virus and spyware goes into your hosts file and makes these changes so that you are redirected to their sites, or prevents you from accessing certain sites. If your anti-virus or anti-spyware programs are properly configured they will prevent you from making any changes to the hosts files, so you will have to temporarily override the program settings while you are performing your test. Just remember that if you do override your anti-virus or anti-spyware programs you want to restore them to real-time protection as soon as you are done. If you forget to do this, you are leaving your computer open for infection.
Comments
No comments yet.