NGINX rewrite rules for Robots.txt

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

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;
  • Was this helpful ?
  • YesNo