Troubleshooting Common AMP Plugin Redirect and 404 Errors
Content
Users of the official AMP for WordPress plugin often encounter issues where their AMP pages either fail to load, redirect incorrectly, or result in 404 errors. These problems can be frustrating, as they prevent your AMP content from being properly indexed by search engines and create a poor experience for visitors. Based on common community reports, this guide will help you diagnose and resolve the most frequent causes of these issues.
Why Do These Redirect and 404 Errors Happen?
These problems typically stem from conflicts between the AMP plugin's URL rewriting rules and other elements of your WordPress setup. Common culprits include:
- Permalink Conflicts: Custom post types with unique rewrite rules or slugs that conflict with the
/amp/endpoint. - Plugin or Theme Interference: Caching plugins, SEO plugins, or other URL-altering plugins (like Pretty Links) can inadvertently modify or block AMP URLs.
- Validation Errors: Kept validation errors in the AMP plugin can cause it to disable AMP on certain pages, leading to redirects.
- Specific URL Paths: Threads indicate that URLs containing certain paths, like
/video/, can unexpectedly halt AMP conversion. - Multisite Configuration: AMP plugin settings in a WordPress multisite network can sometimes lead to widespread 5XX errors.
How to Troubleshoot and Resolve These Issues
1. Check for Validation Errors and Reset Data
A primary step is to review the AMP Validator tool within your WordPress dashboard. If you have "kept" validation errors for certain templates or posts, the plugin may be forced to redirect away from the AMP version. Navigate to AMP > Validation Errors and review any kept errors. Consider using the "Delete plugin data" option upon reinstallation to clear all existing validation state, which can often resolve redirection problems, especially for custom post types.
2. Investigate Plugin and Theme Conflicts
Conflicts are a leading cause of AMP issues. To test for this:
- Temporarily switch to a default WordPress theme (like Twenty Twenty-Four).
- Deactivate all other plugins except AMP.
- Check if the AMP pages (
/?amp=1or/amp/) load correctly. - If they do, reactivate your plugins and theme one by one, testing after each, to identify the culprit.
Pay particular attention to plugins that affect URLs, such as Pretty Links, or those that manage redirects and caching. Some plugins may automatically append /amp to their own generated links, causing 404 errors. For caching plugins like W3 Total Cache, ensure any mobile device detection groups are configured to work with your chosen AMP mode.
3. Verify Your Paired URL Structure Settings
The AMP plugin offers different URL structures for its paired modes (Transitional and Reader). You can choose between a query parameter (?amp=1) or an endpoint (/amp/). If one structure is not working, try switching to the other. This setting is found under AMP > Settings > Paired URL Structure. Note that the plugin may display an admin notice on the Permalinks settings page reminding you of this configuration; this is normal and can be ignored.
4. Review Custom Code and Rewrite Rules
Custom functions that modify permalinks or post type slugs can break the expected AMP URL. If you have code that removes a custom post type's name from its slug (e.g., changing /news/post-name to /post-name), the AMP plugin may still be trying to generate URLs with the original structure, leading to 404s. Review any custom rewrite rules for compatibility with AMP endpoints. Similarly, avoid using a base like /video/ for custom routes, as this is known to interfere with AMP processing.
5. Confirm AMP is Enabled for All Desired Content Types
Ensure that AMP is enabled for the specific content types you are having issues with. Go to AMP > Settings > Supported Templates and verify that your custom post types (e.g., News Posts, products) are checked. If you are using Standard mode, also confirm that your active theme is fully AMP-compatible to avoid unexpected behavior.
When to Seek Further Help
If you have tried these steps and the issue persists, the problem may be more complex. When seeking help in community forums, be prepared to provide:
- The UUID found in the AMP plugin's support section.
- Your current AMP mode (Standard, Transitional, Reader).
- Examples of URLs that are working and not working.
- A list of your active plugins and your theme name.
By methodically working through these common conflict points, you can successfully resolve most AMP redirect and 404 errors, ensuring your mobile pages are served correctly to users and search engines.
Related Support Threads Support
-
AMP redirect error on GSChttps://wordpress.org/support/topic/amp-redirect-error-on-gsc/
-
“AMP disabled” but Google still indexing AMP pageshttps://wordpress.org/support/topic/amp-disabled-but-google-still-indexing-amp-pages/
-
amp a basic versionhttps://wordpress.org/support/topic/amp-a-basic-version/
-
Paired URL Structurehttps://wordpress.org/support/topic/paired-url-structure-3/
-
Constant Redirect Loop When Accessing AMP Pageshttps://wordpress.org/support/topic/constant-redirect-loop-when-accessing-amp-pages/
-
Content NOT Updating on AMP Pageshttps://wordpress.org/support/topic/content-not-updating-on-amp-pages/
-
AMP for CPT Not Working (Follow-Up)https://wordpress.org/support/topic/amp-for-cpt-not-working-follow-up/
-
Amp Issuehttps://wordpress.org/support/topic/amp-issue-26/
-
amp in google discover becomes a blank pagehttps://wordpress.org/support/topic/amp-in-google-discover-becomes-a-blank-page/
-
AMP pages special charactershttps://wordpress.org/support/topic/amp-pages-special-characters/
-
URL is not an AMP page, nor does it link to an AMP pagehttps://wordpress.org/support/topic/url-is-not-an-amp-page-nor-does-it-link-to-an-amp-page/
-
Mediahttps://wordpress.org/support/topic/media-31/
-
AMP Blank page with “Disable AMP on Desktop”https://wordpress.org/support/topic/amp-blank-page-with-disable-amp-on-desktop/
-
AMP pages with custom post typehttps://wordpress.org/support/topic/amp-pages-with-custom-post-type/
-
Bug Report: AMP Conversions Not Activated When URL Contains ‘/video/’https://wordpress.org/support/topic/bug-report-amp-conversions-not-activated-when-url-contains-video/
-
Custom Permalink Setuphttps://wordpress.org/support/topic/custom-permalink-setup/
-
Problems with custom routinghttps://wordpress.org/support/topic/problems-with-custom-routing/
-
Standard Mode vs Reader Modehttps://wordpress.org/support/topic/standard-mode-vs-reader-mode/
-
Incompatibility with the Pretty Links Pluginhttps://wordpress.org/support/topic/incompatibility-with-the-pretty-links-plugin/
-
404 popup on google cached amp pageshttps://wordpress.org/support/topic/404-popup-on-google-cached-amp-pages/
-
AMP for CPT Not Workinghttps://wordpress.org/support/topic/amp-for-cpt-not-working/
-
Persistent 404 Errors on Product URLs Despite AMP Plugin Configurationhttps://wordpress.org/support/topic/persistent-404-errors-on-product-urls-despite-amp-plugin-configuration/
-
Internal pages with amp is redirecting to non-AMP versionhttps://wordpress.org/support/topic/internal-pages-with-amp-is-redirecting-to-nom-amp-version/
-
AMP code is removed from product category page.https://wordpress.org/support/topic/amp-code-is-removed-from-product-category-page/
-
Weird WP redirect error post delete AMP pluginhttps://wordpress.org/support/topic/weird-wp-redirect-error-post-delete-amp-plugin/
-
AMP page for various types of URLhttps://wordpress.org/support/topic/amp-page-for-various-types-of-url/
-
AMP pages missing for categoryhttps://wordpress.org/support/topic/amp-pages-missing-for-category/
-
Paired URL Structure ?amp=1 not workinghttps://wordpress.org/support/topic/paired-url-structure-amp1-not-working/
-
Hierarchy parent to post (plugin) – AMP URL Implicationshttps://wordpress.org/support/topic/hierarchy-parent-to-post-plugin-amp-url-implications/
-
AMP not show in Google AMP Cachehttps://wordpress.org/support/topic/amp-not-show-in-google-amp-cache/
-
Why am I getting ?amp=1 at the URL end instead of /amp/https://wordpress.org/support/topic/why-i-am-getting-amp1-at-the-url-instead-of-amp/
-
AMP pages in Google Discoverhttps://wordpress.org/support/topic/amp-pages-in-google-discover/
-
AMP plugin started giving 500 errors on multisite networkhttps://wordpress.org/support/topic/amp-plugin-started-giving-500-errors-on-multisite-network/