Announcements

Welcome to Servikus Tutorials Area! You will find a ton of useful tutorials in our tutorial area. We hope that you will find them useful! If you want custom tutorial created, please let us know and we will create it for you!

Recent Posts

How to change /etc/hosts file

Posted on 06/07/2014 by

When you get our mail with login details you still cannot see your site. This is because you need to change Nameservers. Even when you change them you need to wait as long as 24-48 hours for propagation. If you want to see you site before that and especially if you want to check if it works as it should (if you already have working site) before changing NSs you need to change etc/hosts file. We’ll show you how you can do that in Windows 7 OS (other Windows versions differs slightly) and also in Linux.

Windows 7

Open Computer and in address bar navigate to C:\Windows\System32\drivers\etc:

1

Double click on file hosts and when it ask Open with choose Notepad (or any preferred text editor) and click ok (Note: If it says “Access denied” right click on file and click on “Run as Administrator”!). When you open it, scroll it to the end. On new line you’ll type IP (which you got from us) and name of your domain twice (once with www and once without it) like this:

2

Save changed file (ctrl + s). If you can’t save it maybe your Antivirus program doesn’t allow you to change that file for security reasons. Disable it and try again. Now you should be able to see your site even though it hasn’t propagated yet.
You can always check status of propagation at https://www.whatsmydns.net/. Just enter name of you site (your-domain.com) in prompt field, leave second field to be A and click search. If you see IP we sent you that means it has changed.
Don’t forget to revert changes (delete those two lines you entered in hosts file) when site is propagated!

Linux

Enter your terminal and type # sudo nano /etc/hosts (instead of nano you can use preferred text editor) and enter your root password:

3

Then enter two lines with your new IP, www.your-domain.com and your-domain.com in it:

4

 

After that, if you are in Nano, press Ctrl + X, then Y and Enter.
You can always check status of propagation at https://www.whatsmydns.net/. Just enter name of you site (your-domain.com) in prompt field, leave second field to be A and click search. If you see IP we sent you that means it has changed.
Don’t forget to revert changes (delete those two lines you entered in hosts file) when site is propagated!

============================================================================

1 Comment
  • Pingback: Servikus Tutorials » How to change nameservers (NS) for your domain

  • Leave a Reply

    Your email address will not be published. Required fields are marked *


    *



    Servikus

    © Servikus
    Terms of Service