Is it possible to ignore the hosts file


If I’m working on a development site, I set the hosts file to point to my version of the website. However, there are times I’d like to simultaneously have the current live site open at the same time so that I can transfer over content etc.

I don’t want to be constantly commenting out the hosts file and flushing the DNS and thought that I might be able to access the live site by its IP address rather than domain name but it’s timing out. Same happens when I ping the domain name through command prompt.

I just wandered if anyone had any ideas for an alternative way to approach this. I’ve tried dropping the www but it still redirects and then picks up my hosts file which sends it back to my version.

Hope that make sense and thanks in advance for any suggestions.

Why not just used a different host name for your development site? What I would do is add an entry in hosts like,

So that the dev site would always point there, and I can still load the live site simutaneously

Hi Pip,

That’s a simple but brilliant solution that I’m embarrassed not to have thought of myself!

Many thanks.

Not to worry. We all have our moments and as developers, tend to always try and over complicate things. But it’s the simple ways that tend to work best :slight_smile:

Why bother with hosts, just use an alternate port.

Must say, I do prefer the hosts approach. Quick and easy.

The port thing would also do the trick, but I hate having to do the “domain colon port” thing when accessing my sites. Preference I 'spose :slight_smile: