Skip to content

Incremental Static Regeneration replaces .amp with ?amp=1 #14251

Closed

Description

@wawoon

Bug report

Describe the bug

  • When the page is built with Amp and SSG config, the output url of amp page becomes /foo.amp (routing is pages/[slug])
  • In the build phase, the non-amp page /foo refers to /foo.amp in <link rel="amphtml"> correctly.
  • However when Incremental Static Regeneration is turned on, the /foo.amp is replaced with /foo?amp=1

To Reproduce

set

  • amp: "hybrid"
  • add unstable_revalidate: 30 to getStaticProps return value.

reproduce:
https://github.com/wawoon/next-amp-ssg-reproduce

yarn build
yarn start
go to http://localhost:3000/foo

Expected behavior

The non amp page should always refer to/foo.amp in <link rel="amphtml"> tag even if Incremental Static Regeneration is turned on.

Screenshots

initial access:

スクリーンショット 2020-06-17 12 59 06

after 30sec

スクリーンショット 2020-06-17 12 59 35

System information

  • macOS
  • Chrome
  • Next: 9.4.5-canary.12
  • Node: v12.14.1

Additional context

#13038
#13046

Activity

  1. changed the title [-]Static Incremental Regeneration replaces `.amp` with `?amp=1`[/-] [+]Incremental Static Regeneration replaces `.amp` with `?amp=1`[/+] on Jun 17, 2020
  2. added this to the backlog milestone on Jun 17, 2020
  3. mohamedsgap commented on Jun 20, 2020

    @mohamedsgap

    @Timer can i take this one ?

  4. Timer commented on Jun 22, 2020

    @Timer
    Contributor

    Sure!

  5. ngocnv-0940 commented on Oct 27, 2022

    @ngocnv-0940

    Any update?

  6. Prasad-JB commented on Aug 10, 2025

    @Prasad-JB

    Hi! I’d like to work on fixing the AMP URL replacement issue when using Incremental Static Regeneration. My plan is to investigate why the <link rel="amphtml"> tag changes from .amp to ?amp=1 after revalidation and ensure it consistently points to .amp. Could you please assign this issue to me? Thank you!

  7. icyJoseph commented on Apr 1, 2026

    @icyJoseph
    Member

    AMP is no longer supported, https://nextjs.org/docs/app/guides/upgrading/version-16#amp-support - an agent reported that this is still happening in v15, but a fix is unlikely to land.

  8. github-actions commented on Apr 15, 2026

    @github-actions
    Contributor

    This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

  9. locked as resolved and limited conversation to collaborators on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions