Live data from Hacker News

301 redirects: a dangerous one way street (2012)

jacquesmattheij.com

31–40 of 92 posts

Re: 301 redirects: a dangerous one way street (2012)

#32
post #9

The problem with 301 without cache headers is that some browsers cache this forever due to some interpretation what 'permanent' means. You often can't use 302 because all your external links no longer work SEO magic for you with a 302. Google only transfers link juice with 301 [1]. If you make a mistake and misconfigure your server, you're toast. If a disgruntled employee 301 redirects your domain, you're toast. If a…

It would be great if there were a service that allowed you to search non-cached controlled 301s a crawler had encountered.

It's certainly doable, but, what are you seeing as a benefit?

Re: 301 redirects: a dangerous one way street (2012)

#33
post #28
post #7

I took over a domain which had previously 301-redirected HTTP:// to HTTPS://. It caused us no end of trouble getting the alpha site online -- obviously we set up SSL but we didn't realise it was the _first thing we'd have to do_. It also caused half a day of confusion to understand why some of our web browsers were still failing to connect and others could see the alpha site (because they'd never visited the previous…

This isn't just a problem with things like HTTP. The industry as a whole lacks a standard uniform way of dealing with domain transfers or expiration. CAs for example will happily issue certificates that expire after your domain.

It's not the CA's job to make sure your domain isn't expiring. It's yours.

Re: 301 redirects: a dangerous one way street (2012)

#34
It's easy to live your life to keep Google happy. 301 redirects have been an important part of online website life.

But then I do accept this perspective (if it's within your call to take this risk). Just don't 301-redirect it. Let the search engines figure it out for themselves.

If a user has a bookmark to an old resource, then it's a liability for you to try to keep your web of 301s working.

KISS!

Re: 301 redirects: a dangerous one way street (2012)

#35
post #14

Earlier quoted context omitted.

This seems yet another example of web professionals not understanding HTTP. Much like webpages that say "404 not found" with a "200 OK" header.

In their defense that is probably the case of their MVC framework or CMS returning a 200 after not being able to match the route and not really them doing it on purpose. But yeah, I agree- (though I've missed them I'm sure) I pretty voraciously make sure my HTTP status matches my intended response- and sometimes that means you've got to write the code in the controller that tells the request to specifically return a…

That just pushes "web professionals not understanding HTTP" one level down the stack, except this "web professional" is not the user doing the clicky, but whoever made the framework; the problem remains unchanged.

Re: 301 redirects: a dangerous one way street (2012)

#36

The problem with 301 without cache headers is that some browsers cache this forever due to some interpretation what 'permanent' means. You often can't use 302 because all your external links no longer work SEO magic for you with a 302. Google only transfers link juice with 301 [1]. If you make a mistake and misconfigure your server, you're toast. If a disgruntled employee 301 redirects your domain, you're toast. If a…

Thanks for this. Can you please share an example of the cache headers you add to 301 redirects?

Re: 301 redirects: a dangerous one way street (2012)

#38
post #9

Earlier quoted context omitted.

It would be great if there were a service that allowed you to search non-cached controlled 301s a crawler had encountered.

It's certainly doable, but, what are you seeing as a benefit?

Possibility to check a domain before you buy it.

Re: 301 redirects: a dangerous one way street (2012)

#39

So if you were to momentarily hack a big site like twitter.com and serve out a 301 to, say, pornhub, you would permanently brick twitter?

Likely a site with the influence of twitter would be able to get this taken care of. (directions at another domain on how to clear your cache or even a direct update from browser vendors possibly)

Re: 301 redirects: a dangerous one way street (2012)

#40
post #14

That's what permanent means. "Adjective permanent Without end, eternal. Lasting for an indefinitely long time. " Also, "This response is cacheable unless indicated otherwise," says RFC 2616. Working as designed, IMNSHO. Perhaps not working as intended , but alas, that's a case of ¬RTFM.

This seems yet another example of web professionals not understanding HTTP. Much like webpages that say "404 not found" with a "200 OK" header.

Stupid protocol decisions are still stupid protocol decisions no matter how much you condescendingly try and blame the user.
Post reply on HN