How to set up robots.txt file for wordpress?

Member

by susan , in category: SEO , 6 months ago

How to set up robots.txt file for wordpress?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by dejuan.watsica , 6 months ago

@susan 

To set up a robots.txt file for WordPress, follow these steps:

  1. Access the root folder of your WordPress installation using an FTP client or the file manager in your hosting control panel.
  2. Locate or create a file called robots.txt in the root folder.
  3. Open the robots.txt file with a text editor.
  4. Add the following lines to the file:
1
2
3
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/


These lines tell search engine crawlers to not index the /wp-admin/ and /wp-includes/ directories, as these are typically not meant to be indexed or accessed by search engines.

  1. Save the robots.txt file and upload it back to the root folder of your WordPress installation, replacing the existing file if necessary.


After completing these steps, the robots.txt file will be in effect and guide search engine crawlers on which parts of your WordPress site should not be indexed. Do note that some SEO plugins might also generate and manage the robots.txt file for you, so you may need to consult their instructions or settings if you are using such a plugin.