NGINX rewrite rules for Robots.txt

All in One SEO no longer generates its own robots.txt as a dynamic page. Instead, it uses the robots_txt filter in WordPress to tap into the default robots.txt created by WordPress.

When you use the Robots.txt feature in AIOSEO, you're modifying the default robots.txt created by WordPress.

Rewrite rules should no longer be needed for NGINX servers. However, if you're seeing a 404 error when browsing to your robots.txt, then the NGINX rewrite rules may be incorrect. Check with your hosting provider that the rule below is present in the NGINX config file for your server:

rewrite ^/robots.txt$ /index.php?aioseo_robots_path=root;

Some configurations of NGINX require rewrite rules to be added to the NGINX configuration file.

If you’re getting a 404 Page Not Found error for your robots.txt on NGINX, then please add the following rewrite rule in your NGINX config file.

NOTE:  If you don’t know what to do with these, then you’ll need to contact your hosting company for support.

rewrite ^/robots.txt$ /index.php?aioseo_robots_path=root;