environment

Panel: 1 panel

Website: wordpress

SEO plugin: aioseo

question

Enter the URL: AAA.com/robots.txt and it will show 404 error

Workaround

Step 1: Enable AIOSEO Custom Robots.txt

  1. Enter the WordPress backend AIOSEO Plugin Panel → Tools → Robots.txt Editor.
  2. At the bottom of the page, check "Enable custom Robots.txt".
  3. Click Save changes, to ensure that the rules take effect.

Step 2: Verify WordPress Permalink

  1. Go to WordPress backend → set up → Permalink.
  2. No need to modify anything, click directly Save changes. (This will refresh WordPress' rewrite rules, ensuring robots.txt Dynamic path takes effect)

Step 3: Check NGINX configuration (via 1Panel)

  1. Log in to 1Panel management panel and enter "website" → Select your WordPress site → "rewrite" folder.
  2. existAAA.com.confAdd the following rule:
    rewrite ^/robots.txt$ /index.php?aioseo_robots_path=root;
    • This rule ensures that all robots.txt All requests are forwarded to WordPress for processing.

Step 4: Clear cache and verify

Before I did this,Open AAA.com/robots.txt, it should display normally. If it still does not display normally, you can consider clearing the cache.

  1. Clear the server cache: If you use a cache plugin (such as WP Rocket, Redis), clear the cache.
  2. Clear your browser cache:according to Ctrl + F5 Force refresh the page.
  3. access https://yourdomain/robots.txt, confirm whether to display the content generated by AIOSEO.

By Loogn sir

An ordinary person who likes to use fun to resist mediocrity; often writes about his own interests; so you will see technology, digital, entertainment, credit cards, Internet... Refuse to be high-sounding and don't be a pseudo-expert; make professional life-like and biochemistry interesting; well, that's it~

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link