How to stop /feed/ folder in WordPress from indexing by Google?
Categorized as Wordpress
Firstly, you just do not have to do that (unless you are a website with a couple of millions sessions per month).
Secondly, you have to ask yourself: Am I optimizing too much? Am I doing the work I need to do?
Thirdly, if you are not agree with previous statements and still want to make in “noidexable” by search systems.
To stop the /feed/ folder in WordPress from being indexed by Google, you can use one of several methods:
- Using the robots.txt file:
- Log in to your website’s root directory
- Create a file called “robots.txt”
- Add the following line to the file:
User-agent: * Disallow: /feed/
- Save and upload the file to your website’s root directory
- Using the .htaccess file:
- Log in to your website’s root directory
- Locate the .htaccess file
- Add the following line to the file:
RedirectMatch 404 /feed/$
- Save and upload the file to your website’s root directory
- Using Nginx configuration file:
- Log in to your server via SSH
- Locate the Nginx configuration file
- Add the following line within the server block:
location = /feed/ { return 404; }
- Save and close the file
- Restart Nginx
Note: Make sure to test your website after making any changes to ensure it is still functioning properly.