Title: robots.txt
Last modified: October 7, 2016

---

# robots.txt

 *  Resolved [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/)
 * Hello, i have a few questions
    1st Should I have custom robots.txt file? 2nd 
   If not I am receiving 404 error 3rd What the best practice?
 * Thanks in advance

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Luke Cavanagh](https://wordpress.org/support/users/lukecavanagh/)
 * (@lukecavanagh)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8264533)
 * [@dyrer](https://wordpress.org/support/users/dyrer/)
 * You can use the virtual robots.txt file generated by the plugin or you could 
   create your own physical one, if you need more control of the content in it.
 *  Thread Starter [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8264551)
 * [@lukecavanagh](https://wordpress.org/support/users/lukecavanagh/) Thank you,
   but I get 404 when click on robots.txt from SEO Framework settings
 *  [Luke Cavanagh](https://wordpress.org/support/users/lukecavanagh/)
 * (@lukecavanagh)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8264589)
 * [@dyrer](https://wordpress.org/support/users/dyrer/)
 * What options do you have enabled in SEO > Robots Meta Settings?
 *  Thread Starter [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8264601)
 * yes
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8266021)
 * Thanks for dropping by again Luke :).
 * Athanasiadis, to answer your questions:
 * **1.**
    Nope, you should not have a custom robots file: Robots are handled by
   WordPress and Google encourages to leave as much out of it as possible. Currently,
   you’re advised to use the “robots” meta tag. This is a very advanced tag and 
   the most important aspects are completely covered through various Robots settings
   throughout The SEO Framework.
 * From the [Google Webmasters Blog](https://webmasters.googleblog.com/2007/03/using-robots-meta-tag.html),
   I quote:
 * > If you use both a robots.txt file and robots meta tags
   >  If the robots.txt and
   > meta tag instructions for a page conflict, Googlebot follows the most restrictive.
   > More specifically:
    - If you block a page with robots.txt, Googlebot will never crawl the page and
      will never read any meta tags on the page.
    - If you allow a page with robots.txt but block it from being indexed using 
      a meta tag, Googlebot will access the page, read the meta tag, and subsequently
      not index it.
 * The latter allows you to ask Googlebot to follow the Canonical URL or redirect
   as well — this lets more of your site be discovered and allows you to gain more
   link juice.
 * For this very reason alone, I discourage a manual robots.txt file.
 * **2.**
    Unfortunately, a plugin or theme is messing up your permalinks, badly.
 * To fix this (temporarily), please re-save your permalinks settings. `Settings-
   > Permalinks -> Save Changes`. The virtual robots.txt file outputted by WordPress
   and adjusted by The SEO Framework should work again.
 * To fix this (permanently), please discover any outdated plugins or themes (with
   2+ years of no updates) and address them by deactivation.
    From there, you should
   check if any active plugins require the Rewrite Engine and which aren’t popular(
   less than 100k installations). Plugins of this type include (to name a few) sitemap,
   custom post type, registration, forum, search, and optimization plugins.
 * Be sure to keep your software up to date as well.
 * I can’t help you any further with this as it’s extremely complex, time consuming
   and might even require back-end (code) access. I also had this issue before (
   which caused a redirect loop upon login) and I had to dive into a (for me) must-
   have (multisite) plugin and rewrite a whole class within — this took over a year
   to discover.
 * If you’re still encountering this issue I must ask you to post it on the WordPress.
   org general help forums. Note that the output of the virtual robots.txt file 
   is done by WordPress itself, so the volunteers over there should be able to help
   you :).
 * **3.**
    The best practice is to use the default robots SEO settings. Throughout
   these forums this question has been asked quite often; and covering this sole
   topic is good for at least a 12 page manuscript. There’s also lot to be found
   on Moz and other SEO bloggers about which tag to use where. If you could give
   me a sample or a web page URL I might be able to lead you into the right direction;
   however, the default settings are most likely always the best option.
 * I hope this all helps you out in some way or another. Cheers! 🙂
    -  This reply was modified 9 years, 7 months ago by [Sybre Waaijer](https://wordpress.org/support/users/cybr/).
    -  This reply was modified 9 years, 7 months ago by [Sybre Waaijer](https://wordpress.org/support/users/cybr/).
 *  Thread Starter [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8307531)
 * Thanks for you detailed answer and you cover all my questions
    But my main problem
   is how to make nginx server create robots.txt, so I cant have 404 error I have
   tested you plugin with apache and works perfect If you have more tips to advice,
   please share
 *  Thread Starter [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8307567)
 * or something like that
 * rewrite ^/robots\.txt$ /static/robots.txt last;
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8310252)
 * Hi Athanasiadis,
 * The robots.txt file is outputted [by WordPress core](https://github.com/WordPress/WordPress/blob/c0f1a4957597e12863c30411ee6ef3864bf9e70d/wp-includes/template-loader.php#L28-L35),
   The SEO Framework merely filters its contents.
    So I find it weird that there
   are any issues, at all.
 * Nevertheless, I believe the code is:
 *     ```
       rewrite ^/robots\.txt$ /index.php?robots=1 last;
       ```
   
 * With that code you should get the dynamic robots.txt file.
 * If you wish to have a static file, you simple have to upload a real robots.txt
   file in your website’s root folder (something like: example.com/www, example.
   com/public or serveruname/public_html). The rewrite rule shouldn’t be present,
   I believe.
 * I hope this helps! Cheers 🙂
 *  Thread Starter [dyrer](https://wordpress.org/support/users/dyrer/)
 * (@dyrer)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8354444)
 * Thank you the last line works perfect

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘robots.txt’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

## Tags

 * [robots.txt](https://wordpress.org/support/topic-tag/robots-txt/)
 * [SEO Framework](https://wordpress.org/support/topic-tag/seo-framework/)

 * 9 replies
 * 3 participants
 * Last reply from: [dyrer](https://wordpress.org/support/users/dyrer/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/robots-txt-2/#post-8354444)
 * Status: resolved