Skip to content

How To Redirect Dead-End Category, Search And Tag URLs In WordPress

Since WordPress 2.5, WordPress automatically handles many redirections on your blog. If you’re using a pretty permalinks in your blog, WordPress will redirect the following three URLs results in 404 (Page Not Found) errors:


These three pages doesn’t exist by default. However, a visitor of your website and search engines, such as Google, may attempt to load these pages. It will lead them to the 404 error page, which will harm your website’s search engine position.

It will better to redirect dead-end category, search and tag URLs in your WordPress to your homepage to extract any leftover search engine rank juice.

Thanks to, we can accomplish this job by adding following code to .htaccess file:

RedirectMatch 301 ^/tag/$
RedirectMatch 301 ^/search/$
RedirectMatch 301 ^/category/$

Don’t forget to enter your website URL in above code. Plus, if your WordPress install is located in a sub-directory called “blog”, use this code instead:

RedirectMatch 301 ^/blog/tag/$
RedirectMatch 301 ^/blog/search/$
RedirectMatch 301 ^/blog/category/$

Leave a Reply

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