Is there any extension to Chrome that will let me force a URL from a particular domain to be redirected to another domain?

(E.g. Redirect http://www.google.com to https://encrypted.google.com.)

Note: I'm looking for an arbitrary redirector, not KB SSL Enforcer, which only works for the specific task of redirecting to HTTPS.

  • You could also consider using the HOSTS file as another method.
    – Synetech
    May 23 '11 at 20:33
  • @Synetech: Would that redirect just the root page, or anything with a particular domain?
    – user541686
    May 23 '11 at 20:39
  • It would redirect the whole domain (or subdomain as the case may be).
    – Synetech
    May 24 '11 at 2:53
  • 1
    @JustinBuser, it would redirect the browser from the original IP to the specified IP. Imagine digging a ditch to re-route water. You dig a ditch, open the dam, then the water goes to the new spot instead of where it would have gone. I never said anything about 302, so you are only arguing semantics.
    – Synetech
    Jul 15 '12 at 17:03
  • 1
    I had no idea encrypted.google.com existed! Cool
    – tony19
    Oct 9 '15 at 20:31

I had built a Chrome extension which does this.

Note: I built this for just 2 sites - just for the heck of it - by no means it's professional quality™. Please don't flame me for crappy code :)

Edit: Updated to manifest v2, which brings in certain additional restrictions.


  "name": "URL Redirect",
  "version": "0.2",
  "description": "Checks URL and redirects as required.",
  "background": { 
   "manifest_version": 2,
   "content_scripts": [
     "matches": ["http://*/*", "https://*/*"],
     "js": ["content.js"]
  "permissions": ["tabs"]


  <script src="redirect.js"></script>


chrome.extension.onRequest.addListener(function(request, sender) {
        chrome.tabs.update(sender.tab.id, {url: request.redirect});


var pattern=/\bBlocked/;
var viewtext_base_url = "http://viewtext.org/article?url=";
var newurl;
if (pattern.test(window.document.title)) // if it matches pattern defined above
  newurl = viewtext_base_url + encodeURIComponent(window.location.href);
  chrome.extension.sendRequest({redirect: newurl}); // send message to redirect


To install this, create files with filenames as mentioned above the codeblock.

enter image description here

Once all 3 files are created, Click on Chrome Menu → Tools → Extensions. Click the "+" on Developer Mode. Click on Load Unpacked extension and point to the directory where the files are stored.

enter image description here

Edit the files are required, and uninstall and reinstall the extension as mentioned above

  • Omg cool! How do I install it? (Sorry I have no experience with developing Chrome extensions, haha.)
    – user541686
    May 16 '11 at 9:05
  • @Mehrdad expanded the answer
    – Sathyajith Bhat
    May 16 '11 at 9:19
  • ofcourse, if you aren't looking at editing the files, I could've packed the files in to a Chrome Extension....
    – Sathyajith Bhat
    May 16 '11 at 9:21
  • Beautiful, thank you so much! It teaches me some JavaScript too! :D
    – user541686
    May 16 '11 at 9:25
  • welcome! I had developed this to learn Chrome extension development. (and to get around coughwebsensecough).
    – Sathyajith Bhat
    May 16 '11 at 11:26

I know I am a bit late in the game to answer this question Still I would like to answer this for future readers. Have a look at

Requestly - A Chrome Extension to modify Network Requests.

Currently, You can setup rules for

  1. Redirect a request URL to another url.
  2. Block some requests.
  3. Replace some part in URL with another string. (Even whole URL can be replaced)
  4. Add/Remove/Modify Headers in HTTP(s) Request and Response. You can setup Header Modification Rules only for specified URLs now.

Screenshots for more understanding:

  • List of Rules

List of Rules

  • List of Rule Types

List of Rule Types

  • New Redirect Rule

Creating a Redirect Rule

There are lot of things in roadmap to be covered in requestly like

  • Setting custom headers (Done)
  • Switching User Agents
  • Setting parameters in request (Done) Use Redirect/Replace feature to accomplish this.

.. and a lot more.

PS: I have created this So you can blame me if you do not find this helpful :)

  • Headers Modification is now present in Requestly.
    – blunderboy
    Jan 8 '15 at 5:07
  • 1
    This is an awesome extension! I logged in just so I can give you a +1, hopefully more people find out about it :)
    – Adi Ulici
    Feb 11 '15 at 12:11
  • Regex Support is also available in Requestly
    – blunderboy
    Oct 15 '15 at 4:45
  • @sachinjain024 the link to github repo is dead as of now. Dec 19 '17 at 8:55

I have developed a pre packaged user friendly redirector called Switcheroo if you're interested:

Setup custom redirect rules for any http request i.e pages, scripts, images etc. Uses a simple string replace to do this.

  • 5
    Open source? :)
    – user72923
    Nov 19 '12 at 23:10
  • 1
    Too bad Switcheroo doesn't support switching HTTP schemes (as indicated in the example in the question).
    – Martijn
    Jul 6 '14 at 19:02
  • 2
    Also too bad it needs permission to "Read and change all your data on the websites you visit" just to redirect.
    – Taylan
    Feb 1 '17 at 20:21

A bit late, but this extension should surely do the trick: Redirector.

And it's an arbitrary redirector.

  • Works great to avoid the Facebook start page, Match: http?://www.facebook.com, Substitute:(.*), Replacement:facebook.com/messages
    – lony
    Apr 25 '14 at 9:51
  • 4
    oh no, it's been removed? looked great from the screenshots! (regexes and such, which is what I need)
    – Don Hatch
    May 22 '14 at 0:38
  • 1
    – Boris
    Aug 10 '20 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.