Do you need to edit your blog’s robots.txt file? In this post, we will show you the simplest method to edit robots txt file in WordPress. You don’t need file manager access or FTP access for this. All you need is the WordPress SEO plugin Yoast.
Edit Robots TXT File In WordPress Using Yoast SEO
First of all, you need to go to the tools section under plugin settings.
Now, choose the file editor.
If you are doing it on a new blog, probably you don’t have a robots file there. Now, you need to create a new robots file.
Within some time, you can see your newly created robots file on the page.
Simply edit it from there. In my case, I would like to block all search engine access to my affiliate links. I am using ThirstyAffiliates plugin and my prefix is /refer/.
Add the below code to the robots file,
Simply add the code and save the file.
You can see the changes there.
If you wish to see a live action of your robots file, simply enter www.example.com/robots.txt. You may need to replace example with your own domain name.
We hope you found this tutorial helpful and learned something new. If you did, please consider sharing our post with your friends on social media.