Skip to Content

A stick figure smiling

Here's a preview from my zine, HTTP: Learn your browser's language!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

Sometimes you type a URL into your browser:

but end up at a slightly different URL:
ooh, where did the cat come from? I didn’t type that!

Here’s what’s going on behind the scenes:


GET /dog.png   
HTTP/1.1 Host:


301 Moved Permanently 
Location: /cat.png

browser: okay, I’ll try /cat.png instead


GET /cat.png HTTP/1.1 


200 OK
<rest of website here>

The Location header tells the browser what new URL to use.

The new URL doesn’t have to be on the same domain: can redirect to Setting up redirects is a great thing to do if you move your site to a new domain!

! Warning !

301 Moved Permanently redirects are PERMANENT: after a browser sees one once, it’ll always use when someone types forever. You can’t take it back and decide to not to redirect. If you’re not sure you want to redirect your site for eternity, use 302 Found to redirect instead.

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)