Redirect AMP Links to Actual Websites with Privoxy

Google introduced AMP in 2015 and it has been controversial 1 to say the least.

If like me you don’t care much about this gimmick, you’d be delighted to know there is a way to transparently redirect every AMP link to their actual website using Privoxy.

In the Privoxy settings file (user.action is a good place to start), add:

{ +redirect{s@google.com/amp/s/@@} }
google.com/amp/s/.*

After restarting Privoxy, check with curl to see if the redirection is working all right:

$ ALL_PROXY=127.0.0.1:8118 curl -LfI http://google.com/amp/s/example.com
HTTP/1.1 302 Local Redirect from Privoxy
Location: http://example.com
Content-Length: 0
Footnotes
1.
My opinion is that the AMP initiative is fundamentally about control,
#privacy #tips