We have talked about how you can block or redirect websites in your PC using the special HOSTS file that maps the domain names to IP addresses locally before your system consults the configured DNS server. But editing the HOSTS file requires admin privileges on a system and may be a little confusing as it involves editing the text based file in a particular manner. Besides the HOSTS file method redirects the domain name on a system wide level. What if you want to redirect some domain names only in one web browser? If you use Firefox web browser, then you can use the Redirector add-on to do all the redirecting for you.
Redirector add-on is the easiest way to redirect domain names for you. It places an icon in the Firefox toolbar clicking on which you can see the options to disable the add-on or edit the redirects. For the redirection to work, you have to add some redirection rules which you can do by choosing Edit Redirects from the options.
From the “Edit Redirects” screen, you can choose to create a new redirect, edit already added redirects, import or export the redirects. When you choose to create a new redirect, you have to add a name for the rule, domain pattern, target URL, and whether the rule applies to address bar, iframes, images, stylesheets, scripts, ajax, embedded objects and so on. You can use both the wildcard pattern or the regular expression for describing the source domain that you wish to redirect.
Once a redirect rule is in place, you can test by entering the domain name in the address bar – it will be redirected as per specified by your redirect rules. If you want to momentarily stop the redirection, then you can right-click on the Redirector icon in the Firefox toolbar and choose to disable it.
You can download and install the Redirector add-on from https://addons.mozilla.org/en-US/firefox/addon/redirector/.