Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I override a hostname in firefox? for example when I access it should actually access localhost and not

Does any add-on provide that capability?

share|improve this question

migrated from Jan 25 '10 at 9:54

This question came from our site for professional and enthusiast programmers.

why does someone wanna close this question? Don't we have to specify a reason why someone voted to close it? – Priyank Jan 25 '10 at 6:18

Why not just use HOSTS files, which is what everyone who wants to specify an IP address for a domain name does?

share|improve this answer
I personally don't like using host files because if you are switching between a dev and production site using host files you have no way to tell what environment's host files you are using. If you use a Firefox add in in like Redirector, you can quickly see, if re-directions is happening. And host files are generally used when DNS does not work properly. In my humble opinion :) – Rihan Meij Jan 25 '10 at 5:41
Yeah, Rihan is right. My main aim is to test dev in firefox browser which should redirect to local while prod can be tested in chrome. I didn't want to modify hosts file as that would make both browser point to local. That wouldn't serve my purpose. – Priyank Jan 25 '10 at 5:48
You need to be superuser to do that, and that will affect every user of the machine... – Totor Jul 26 '13 at 9:27

Redirector: (donationware)

share|improve this answer
I tried using it and maybe I am doing something wrong; but though I could configure it, it still doesn't redirect. – Priyank Jan 25 '10 at 5:49
Can you give me any more specifics? I tried it and it did work. The download page indicates that it currently works on FF 3.5 only. – Jay Jan 25 '10 at 5:58
This doesn't do what the user asked. – reconbot Sep 27 '11 at 14:00

I think that SwitchHost does exactly what you want:

share|improve this answer

Yes, switchhost would be the one, if you are not in MAC OSX 10.5.8. with Firefox 3.5.9. and your hosts file is not longer than a single row. Adding more rows screws up the file, and all hostname values other than first one get deleted. The idea is perfect though.

share|improve this answer

You must log in to answer this question.