What is Robots.txt? and how to create it?
- Melisa Yılmaz

One of the most important tasks of search engine bots is to crawl and archive websites. If you want to make parts of your website inaccessible to search engine bots, the Robots.txt file is one of the methods you can use for this purpose. You need to be very careful when creating a file, because an incorrectly created file can cause important parts of your website to be inaccessible to search engines, or vice versa, with the wrong directory created, your website will not be taken into account by search engines and all directories that you do not want to be crawled can also be crawled. What kind of file directory should be prepared in terms of SEO and what should be considered? Let’s take a look together.
How to Create Robots.txt
- be located in the root directory of your website
- Preparation in accordance with UTF-8 character encoding
- The URL of the file and the site URL are the same
- Site URL: https://www.mobitek.com/
- Robots.txt URL: https://www.mobitek.com/robots.txt
- Site URL: https://www.mobitek.com/
- Robots.txt URL: https://www.mobitek.com/blog/robots.txt
Commands
- User-agent: the part where the search bot will come up with its name
- Allow: This command allows you to specify which pages on your site you want to be indexed.
- Disallow: This command allows you to specify which pages on your site you don’t want indexed.
- User-agent: *
- Disallow: / temp /
- User-agent: Googlebot
- Disallow: / displays /
- Disallow: / temp /
- Disallow: /cgi-bin/
