Fix: Local hosts file DNS is ignored

Changing the local hosts file ip can be very effective. For example when you want to move a site from one server to another (change IP).

Click here for a guide on how to setup a local host file DNS change

 

But how can you be sure that you are accessing your locally defined IP when you go to a website?

There are many local IP lookup tools out there, the most simple solution is to open a command line tool, like Command Prompt  (on Windows) and type

Then type (input your own website):

ping yoursite.com

Which will then return your locally setup IP from your hosts file.

But in my case it doesn't!

 

I found out the problem was insane ISP caching (Internet Service Provider - the guys supplying you with internet)

 

So what I did was connect to my mobile internet (set up a hotspot) and then instantly I could see my local hosts file changes.

I am still searching for a better solution, but for now this is definitely working.

karsten@madsen.pw'

Karsten Madsen

I mostly write about ideas and concepts. My passion is bulding stuff for the future and how we can improve ethics in this world. On this site my writings will relate to my struggles in web development and technical SEO :)