How does WordPress redirect mistyped URLs to the correct one?

Well, I’m not sure exactly because it is A LOT of code, but to make it stop, you can use the filter ‘redirect_canonical’ and return false.  like so:

add_filter( 'redirect_canonical', '__return_false');

So say you have a post named “mission” at, but for some reason you really want to go to instead of being redirected to the post, returning false with redirect_canonical will allow you to visit the url you want.

‘redirect_canonical’ is actually an SEO feature built into WordPress.  This function redirects duplicate content like to among other things.  Disable it with caution.

Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *