Title: AMP 404 error
Last modified: September 7, 2016

---

# AMP 404 error

 *  [Anton Koekemoer](https://wordpress.org/support/users/antonkoekemoer/)
 * (@antonkoekemoer)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/amp-404-error/)
 * Hi there,
 * Currently the AMP URL in the header is as follows:
 * `<link rel="amphtml" href="http://mydomain.xyz/about-us/amp/" /><script>` – I
   changed the domain name.
 * But when accessing any “page” with /amp/ it gives a 404.
 * The AMP on “pages” only works by adding `?amp=1` to the URL. The problem is that
   the link in the header is pointing to /amp/ and so the Google bot accessing pages
   generates 404 errors.
 * How can I rewrite the link URL to use `?amp=1` instead of /amp/ so that the AMP
   on pages can work?
 * I’ve got this installed on a couple of websites and all are using the /amp/ in
   the URL and none seem work.
 * Thanks

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

 *  Thread Starter [Anton Koekemoer](https://wordpress.org/support/users/antonkoekemoer/)
 * (@antonkoekemoer)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8188757)
 * Anyone else experience this problem?
 * How can I rewrite the the link URL in the header to use `?amp=1` instead of /
   amp/?
 *  [smcandrew](https://wordpress.org/support/users/smcandrew/)
 * (@smcandrew)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8203180)
 * Anton – I have the exact some issue (on several sites). For POSTS it works fine
   with /amp/ but for Pages (with that option enabled) /amp/ 404’s. Like you I can
   also get to the AMP page by specifying ?amp=1.
 * IMO this is a bug (I’ve tested it on several WP installs including a fresh one).
   If you happen to come across a solution before Yoast responds please post it 
   here. Thanks.
 *  [cvgstrategy](https://wordpress.org/support/users/cvgstrategy/)
 * (@cvgstrategy)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8214546)
 * I got the same errors, turned off Pages and no errors. But, my pages are not 
   AMP. Why is this happening? Why, if this is a new standard that has advantages,
   is it so difficult to get working and why would anyone, if the required ending
   is /amp/ have it generate ?amp=1?
 * If anyone comes up with a fix, please share! If I can figure it out, I will let
   you all know how.
 *  [welje](https://wordpress.org/support/users/welje/)
 * (@welje)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8225359)
 * It’s the same for me ….
 *  Thread Starter [Anton Koekemoer](https://wordpress.org/support/users/antonkoekemoer/)
 * (@antonkoekemoer)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8231514)
 * I found a short term solution.
 * In the plugin /amp/includes/amp-frontend-actions.php
 * Change
 * `$amp_url = amp_get_permalink( get_queried_object_id() );`
 * To
 * `$amp_url = get_permalink() . "?amp=1";`
 * This changes the current URL from /amp/ to /?amp=1
 * Problem is that it’s actually not Yoast related and someone might have a better
   solution or fix, because when the AMP plugin gets updated, the changes will be
   lost.
    -  This reply was modified 9 years, 8 months ago by [Anton Koekemoer](https://wordpress.org/support/users/antonkoekemoer/).
    -  This reply was modified 9 years, 8 months ago by [Anton Koekemoer](https://wordpress.org/support/users/antonkoekemoer/).
 *  [smcandrew](https://wordpress.org/support/users/smcandrew/)
 * (@smcandrew)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8232108)
 * They just updated the AMP plugin. Now it doesn’t 404, it redirects to the non-
   AMP page. It seems as though this is an issue with the Automattic AMP plugin,
   not Yoast’s plugin… Yoast’s plugin now says:
 * > Please note: Currently pages are not supported by the AMP plugin. We still 
   > show this option to be able to provide functionality when the AMP plugin implements
   > support for them.
 * …right above the “Save Changes” button. Which let me to the Automattic AMP Plugin
   which says:
 * > Note #1: that Pages and archives are not currently supported. Pages support
   > is being worked on.
 * Hope they update the Automattic plugin soon…
 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8674377)
 * I’m having this issues on a blog with 0.4.2 AMP plugin also. I have no idea what
   is going on, used to work like a charm. Now the <link rel=”amphtml” link goes
   to a 404 page.
    -  This reply was modified 9 years, 4 months ago by [DrLightman](https://wordpress.org/support/users/drlightman/).
 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8674545)
 * I somehow fixed the problem by hitting Save on the Settings>Permalink dashboard
   page, without doing any new modification, only an hit of Save.
 *  [Gujar Singh](https://wordpress.org/support/users/cedric82n/)
 * (@cedric82n)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8714227)
 * Thanks DrLightman,
    Your solution working awesome.
    -  This reply was modified 9 years, 4 months ago by [Gujar Singh](https://wordpress.org/support/users/cedric82n/).
 *  [jn3101](https://wordpress.org/support/users/jn3101/)
 * (@jn3101)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/amp-404-error/#post-8715951)
 * Thanks DrLightman. How did you get this idea?^^ WTF.
 *  [bolhaw](https://wordpress.org/support/users/bolhaw/)
 * (@bolhaw)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/amp-404-error/#post-9350483)
 * Anton Koekemoer: Did you install ‘AMP for WP Accelerated Mobile Pages’ plugin
   first? if not install it and install the AMP plugin, so you will have to install
   2 plugins:’AMP for WP – Accelerated Mobile Pages’ plugin and ‘AMP’ plugin. after
   it will work perfectly.
    Thanks

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

The topic ‘AMP 404 error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/glue-for-yoast-seo-amp_ddbb3a.svg)
 * [Glue for Yoast SEO & AMP](https://wordpress.org/plugins/glue-for-yoast-seo-amp/)
 * [Support Threads](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/)
 * [Active Topics](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/glue-for-yoast-seo-amp/reviews/)

## Tags

 * [Yoast](https://wordpress.org/support/topic-tag/yoast/)

 * 11 replies
 * 8 participants
 * Last reply from: [bolhaw](https://wordpress.org/support/users/bolhaw/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/amp-404-error/#post-9350483)
 * Status: not resolved