codehaven - php snippets - coding help
Generic filters
Exact matches only

Stop author and category from being indexed by WordPress

31st May 2019

Admin WP

wordpress category

This code below will prevent WordPress from indexing the Author and Category.
Add this code to your functions.php file.
Check this by using screaming frog.

You can also do this from the .htaccess file

You can test this by visiting www.mywebsite.co.uk?author=1
After applying a script visit the url of your website and see if it still appears.

Was this code snippet helpful?