How to Edit Robots Txt and Htaccess File in Yoast SEO

How to Edit Robots.txt and .htaccess File in Yoast SEO

Yoast SEO is one of the best plugins that exist for WordPress today, it has more than 5 million active installations and has a 5-star rating, in addition to having a free version and a paid version. In today’s article, I will show you how to edit the Htaccess and Robots txt file from the Yoast SEO plugin, you will see how easy it is.

Personally, the free one has always come in handy for all my websites, this is one of the first plugins that I always install since even in its free version it has many functions that are good for us and make things much easier.

First of all, I want to warn you that these files are very delicate, so that if you edit them badly it can affect the operation of your entire website, so I recommend you not to touch them unless it is necessary and you really know what you do.

One of the main reasons to edit the robots.txt file is to tell the Google spider which URLs it can and cannot index; on the other hand, the main reason for editing the .htaccess is to create redirects. The latter is necessary when we change our domain from HTTP to HTTPS so that URLs with HTTP do the automatic redirection to HTTPS.

 

How to Edit Robots Txt and Htaccess with Yoast SEO

First, you must go to the configuration of this plugin, you will find it in the left gray column, it is generally between the last boxes, you must click on the box that says “SEO”.

Then we go to the fourth box “Tools”, once there we will see four options, in this case, we must click on the one that says “file editor” and the following box will open.

This is where we can configure these two files. The settings you see in the image are the ones that come by default for each of them and in case you don’t have a robots.txt file created, you will be shown a button where you can create it just by clicking on it.

Remember that the misuse of these files can damage your website, so once again we remind you not to touch them unless it is necessary and you are sure of what you do.

For any questions, do not forget to make a backup copy of your website before any changes.

 

Also Read: How to Pin a Post in WordPress