Title: New pages get validation errors
Last modified: May 12, 2022

---

# New pages get validation errors

 *  Resolved [Lucas](https://wordpress.org/support/users/culturalistpress/)
 * (@culturalistpress)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/)
 * Hi,
 * I posted earlier that I have problems getting AMP to validate and then the issue
   resolved:
 * [https://wordpress.org/support/topic/referenced-amp-url-is-not-an-amp-31/](https://wordpress.org/support/topic/referenced-amp-url-is-not-an-amp-31/)
 * However it only resolved for those pages, everytime I create a new page or even
   older pages somehow I get the error “the referenced URL is not AMP”
 * Is there an SOP or way I can prevent the non-amp version from ever showing? Its
   causing Google to send me errors, for instance I revalidated over 100 pages manually
   then this morning Google sent errors on posts I had fixed before:
 * [https://www.culturalistpress.com/what-is-gerrymandering-and-why-does-it-matter/?amp=1](https://www.culturalistpress.com/what-is-gerrymandering-and-why-does-it-matter/?amp=1)
 * [https://www.culturalistpress.com/burr-coffee-grinders-the-best-way-to-grind-your-brew/?amp=1](https://www.culturalistpress.com/burr-coffee-grinders-the-best-way-to-grind-your-brew/?amp=1)
 * So when the plugin works it is helpful but I can’t predictably remove these errors
   of non-amp version.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnew-pages-get-validation-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15642473)
 * Hello [@culturalistpress](https://wordpress.org/support/users/culturalistpress/)
 * Thank you for contacting us, as I mentioned before please check your cache mechanism,
   specially Cloudflare cache settings to check if it’s ignoring query parameters
   such as `?amp=1` or `?abc=1`
 * ([screenshot](https://prnt.sc/loZpIiDQR6cI))
 * Here is a response header test example: [https://geekflare.com/tools/tests/8rg8yjaim](https://geekflare.com/tools/tests/8rg8yjaim)
 * We cannot control Site’s cache behaviour with AMP plugin, so I will request you
   to check with the cache mechanism support.
 *  Thread Starter [Lucas](https://wordpress.org/support/users/culturalistpress/)
 * (@culturalistpress)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15643001)
 * Hi,
 * I do not have cloudflare set to ignore query params. Also clearing cache on its
   own never resolves the issue. I double checked and my cache params for cloudflare
   are set to standard which according to them:
 * “Standard: Delivers a different resource each time the query string changes.”
 * Thanks,
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15643110)
 * Hello [@culturalistpress](https://wordpress.org/support/users/culturalistpress/)
 * Thank you for checking that, then it might be the [SG Optimizer](https://wordpress.org/plugins/sg-cachepress/)
   plugin that might be ignoring query params, they documented a filter on the plugin
   listing page that we can use it.
 * I will recommend adding the following code in your active themes functions.php
   or in a custom plugin using FTP or a tool like CPanel.
 *     ```
       add_filter( 'sgo_bypass_query_params', 'amp_add_sgo_bypass_query_params');
       function amp_add_sgo_bypass_query_params( $bypass_query_params ) {
           // Add custom query params for amp, that will skip the cache.
           $bypass_query_params[] = 'amp';
           return $bypass_query_params;
       }
       ```
   
 * This will skip all AMP pages from being cached, let me know once you add the 
   code.
 *  Thread Starter [Lucas](https://wordpress.org/support/users/culturalistpress/)
 * (@culturalistpress)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15643339)
 * I dont mean to be silly but don’t I really need my AMP pages cached since the
   whole point is to push on mobile performance as much as possible?
 * In either case I set an exclusion in SG optimizer to exclude ?amp=* from cache–
   can you now check to see if this is even the issue?
 * Thank you
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15643520)
 * [@culturalistpress](https://wordpress.org/support/users/culturalistpress/)
 * Can you please clear the site cache (Site Ground) as well as purge Cloudflare
   cache?
 * > I dont mean to be silly but don’t I really need my AMP pages cached since the
   > whole point is to push on mobile performance as much as possible?
 * Yes, you are absolutely right, Cache is recommended for AMP pages to perform 
   better.
 * But since your cache plugin might be caching the pages while ignoring query parameters,
   which makes Google Search Console/AMP validator difficult to differentiate
 * Eg:
    1) let’s suppose you visit a page normally (not an AMP page version with?
   amp=1) 2) SG optimizer plugin creates a cached version and serves the page. 3)
   The plugin created a cached version then transmitted it to Cloudflare which creates
   a network cached version and serves users. 4) since the plugin doesn’t honor 
   query parameter requests it will server non-AMP version to both AMP (?amp=1) 
   and non-AMP (/) requests
 * What you can do?
 * Use a different Caching plugin that also caches query parameter requests.
    **
   OR** Change the AMP plugin to Standard Mode.
 *  Thread Starter [Lucas](https://wordpress.org/support/users/culturalistpress/)
 * (@culturalistpress)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15643870)
 * Hi,
 * I did clear the cache prior and have now.
 * Also like I said earlier I don’t believe its the cache as when the error happens
   clearing all cache doesn’t result in resolution of error – Google reports the
   same error when rechecked.
 * At this point I have excluded the query parameters as well.
 * Are you sure its a cache issue?
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15648861)
 * Hello [@culturalistpress](https://wordpress.org/support/users/culturalistpress/)
 * Thank you for getting back, Yes I am Positive that the cache plugin is the reason
   for the false-positive report, as I tested SG Optimizer on my local(test) site.
 * I just checked and it looks like the query parameter exclusion code might be 
   removed. as I am getting 304 responses for AMP pages.
 * Once you add the query parameter exclusion code, clear plugin, as well as cloudflare
   cache, and check the AMP (with `/?amp=1`) and non-AMP (just `/` ) pages on [AMP Test](https://search.google.com/test/amp).
 * The Google Search Console will update and remove errors once googlebots re-visit
   your site to validate AMP pages. the process may take 1-2 weeks.
 * As I mentioned before you can consider a different [caching plugin](https://amp-wp.org/documentation/getting-started/amp-site-setup/page-caching-with-amp-and-wordpress/)
   or Switching to [Standard Mode](https://amp-wp.org/documentation/getting-started/standard/)
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15670005)
 * [@culturalistpress](https://wordpress.org/support/users/culturalistpress/)
    As
   we didn’t receive a response I’ll mark this as resolved. Feel free to open a 
   [new support topic](https://wordpress.org/support/plugin/amp/#new-post) if you
   require any further assistance.

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

The topic ‘New pages get validation errors’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/new-pages-get-validation-errors/#post-15670005)
 * Status: resolved