From the course: Technical WordPress SEO (2019)

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Creating robots.txt via a plugin

Creating robots.txt via a plugin - WordPress Tutorial

From the course: Technical WordPress SEO (2019)

Creating robots.txt via a plugin

- [Narrator] Let's talk through a scenario where we create a robots dot txt file using a plugin for WordPress. Let's say that I have a website for example salt and simple.com and it has a search functionality. So am going to search for spinach and you'll notice at the top bar that the search results start with the question mark s equals spinach. And this question mark s parameter denotes that there is a site search. Let's say that we do not want Google to index or crawl any of our site search content. So we're going to disallow forward slash question mark s. A relatively straightforward way is to use what's known as a virtual robots dot txt file. And we call it a virtual robots dot txt file because the plugin will virtually overwrite the robots dot txt file that lives within the directory of your server. And this plugins format works fairly well, assuming you have the correct permissions. To show you how it works, let's…

Contents