• Resolved MartijnAtWordPress



    Hope somebody can help/ advise me on the following issues.


    AMP doesn’t work correctly anymore. On mobile, it doesn’t pick up the AMP version automatically.

    When I enforce the setting “Redirect mobile visitors to AMP” (Which should not be necessary), it still shows some issues when opening the AMP version.

    Note: AMP is only enabled on posts within the category “Hotel News” and “Travel News”.

    ISSUE 1: Error message when visiting AMP page

    When clicking on an AMP URL within Google Mobile Search, it shows first the following message “Sorry this page is not valid AMP HTML”, before it is redirected to the AMP version.

    Please see an example video of the situation: https://test123456.nl/test-2/

    PLEASE NOTE: When checking the AMP version via https://search.google.com/test/amp, The page is valid and has no errors.
    – Example AMP version for mobile: https://test123456.nl/amp-version
    (Desktop version: https://test123456.nl/non-amp-version)

    NOTE: to reproduce the exact issue can be difficult since:
    1) The outcome differs (sometimes there is no error message)
    2) Sometimes the URL is visible as an AMP and sometimes as NON-AMP version within Goggle Mobile search (See issue 2)

    ISSUE 2: The same URL not showing as AMP in Search

    The same day the URL can be visible within mobile search as AMP and then as NON-AMP page. It somehow switches between AMP and NON-AMP.

    Please see the example: https://test123456.nl/test-2/

    I hope I explained my case well.

    I am looking forward to hearing from you.

    Kind regards, Martijn

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Milind More


    From inspecting your site I first noticed you don’t have a redirection in place, with your non-secure (http) site accessible.

    Your amphtml link (screenshot) also references your URL without any scheme/protocol. it’s recommended to use https

    It may also be worth checking any optimization or caching plugins for minification options, I noticed a Cloudflare reference in the video you provided which may also have such features.

    Alternatively, we would like to know if you have made any major changes recently ( Added a plugin, enabled cache etc )

    If you find the same results please share your Site Health information via this form so we can check your setup

    Thread Starter MartijnAtWordPress


    Thank you @milindmore22 for your feedback. I’ll appreciate it!
    I’ll have a look at your suggestions. I’ll keep you updated.

    Thread Starter MartijnAtWordPress


    Hi @milindmore22,

    I have an update and a followup question.

    We fixed your first remark (Redirection issue) and working on the caching/ minifications) and mad already some improvements.

    How can we change the amphtml link to HTTPS? Do we have to reinstall/ configure the AMP plugin, so it picks up the “new HTTPS URL”? Or is there another way?

    Kind regards, Martijn

    Plugin Support Milind More


    No, you don’t need to reinstall the plugin, this might be because of the HTML minification feature you have enabled.

    Dear Milind,
    Thanks for pointing that out. I also speak on behalf of martijnatwordpress
    and wonder how I can influence the link in the amp by turning off minification (cf / ao / rocket).
    If I turn off all minification, would it automatically generate the new https protocol link? because then I can only turn it on and off? Doesn’t it seem to me that there must be a way to be able to access this manually outside of the minification?

    Your amphtml link (screenshot) also references your URL without any scheme/protocol. it’s recommended to use https

    How can we provide a protocol for these links If the links are generated automatically?

    Plugin Support Milind More


    Hi @data1online,

    Check if you can add an exception for the rel=”amphtml” while doing HTML minification.

    Also please check amp_get_permalink filter.

    It will be very helpful if you share site health information via this form so we can understand your setup better and provide better assistance.

    • This reply was modified 3 years, 7 months ago by Milind More.
    Thread Starter MartijnAtWordPress


    Hi @milindmore22, I just filled in the form with the site health information.

    Plugin Support Milind More


    Hello @martijnatwordpress

    Thanks for the info, I’m unable to reproduce the same issue from my side. Can you try to check whether the same issue arises when you activate plugins one by one following the steps below:

    1. Install and activate the Health Check & Troubleshooting plugin.
    2. Navigate to Tools > Site Health > Troubleshooting.
    3. Enable trouble shooting mode
    4. Visit plugin -> installed plugins and activate them one by one and check which plugin is causing issue

    You can exit troubleshooting mode afterward.

    Thread Starter MartijnAtWordPress


    Hi @milindmore22,

    Hope you had a good weekend.

    – Question regarding:
    “Check if you can add an exception for the rel=”amphtml” while doing HTML minification”
    Where can we add this exception?

    – Regarding:
    “Also please check amp_get_permalink filter”
    Please see https://pastebin.com/D1wSxm00. I am not what to check.

    Hi @milindmore22, before diving deeper into the context I am wondering if you suggesting a plugin is blocking the code from showing the amphtml? or screwing up the HTTPS protocol?

    I have CF’s all redirect to HTTPS activated so all connections now go to HTTPS but still pages do not move to the amp link when visiting an amp-paged post I guess due to the fact it’s still not showing the HTTPS protocol in the amp URL.
    How can we refresh those URL’s so all URLs convert to https inside the code, can Avada theme blocking something?

    I cannot find a way to make an exception of “rel=”amphtml”, only files can be excepted in Autoptimize and Cloudflare does not show me an option either.

    just fyi: Autoptimize doesn’t act on AMP-pages, so nothing to configure there 🙂

    frank (ao dev)

    Plugin Support Milind More


    Hello @data1online and @martijnatwordpress

    I am suggesting that one of the plugins or your theme might behind this
    as you can check on your non-AMP page, it stripped https protocol from several other tags also (check this screenshot ), it’s not AMP plugin specific issue.

    to find which plugin/theme might be the cause of this please follow the instruction which I posted earlier.

    @optimizingmatters Thank you for your input, the link on <link rel="ampthml" is on non-AMP page.

    Thanks AO I know this but I have to make clear what kind of minify Is in place since Milindmore22 is pointing out to except something around it.

    @milindmore22 Thanks for the reply.

    The website has added or changed little to no plugins over time, the theme has always remained the same and AMP has once run successfully in the same composition. The fact that there is no https: reference in the code now (screenshot) is when you look deeper in the console a reference to an https address so I’m not sure if this is causing the problem or if this is something that stands out but the problem is not increased by it.
    The goal is that google does not sometimes but always call every amp-available pages where we now sometimes see and sometimes not an AMP indication when searching via google and / or visiting the page via google. The 2nd goal is that all pages that contain an AMP version also call the AMP version via direct links on the site, currently, no page does that, only google points to AMP pages.

    If you indicated that minification for the above could be a problem, would you suggest that wp rocket, autoptemize and cloudflare all need to be minication-disabled in order to determine whether the problem takes place in minification or has something more to do with google?

    finally, to prevent a redirect loop with Cloudflare, a redirect to HTTPS has been removed from the access and taken over in Cloudflare by “redirect all” via their ssl, could this be a problem for google to determine if an page has https+amp?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Error when showing AMP version’ is closed to new replies.