Redirecting WordPress Tags

Redirecting WordPress Tags

Tags in WP are ok for some cases, I don’t use them and I certainly don’t want google indexing groups of tagged pages making loads of duplicate content and generally adding bulk to my SERP list where it is not needed. Put simply tags are pointless, they make your site look old and are in my opinion a piece of WordPress that has a very limited application.

Anyway so the scenario is you have removed tags from your site, cleaned up your list of URLs and maybe put some redirects in to direct main category tags to pages or posts. Here comes a problem, Google had all these tags indexed and now they are gone, simple solution put in a redirect and let google know that they are no longer valid. This will also help clean up your SERPs and make sure there are no rogue 404s for users.

The Problem

Tags Causing 404s after they have been removed, google doesn’t like 404s, neither should you. Below an example view of a Google Webmaster set of warnings that old tag pages are now creating 404s.

Google Webmaster SERP 404s

 

The Solution

Copy and paste this into your .htaccess file and all will be fixed 🙂
<IfModule mod_alias.c>
RedirectMatch 301 ^/tag/*      https://niallflynn.com/
</IfModule>

Oh yeah and remove my domain and add your own. Any questions drop me a line hello@niallflynn.ie