question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hybrid Index Amp pages always shows the amp version in production.

See original GitHub issue

Bug report

Describe the bug

When creating a hybrid Index Page, with a getStaticProps function, the index page in production will always show the amp page in domain.com and not in domain.com/index.amp

This works as expected in dev mode, where the non amp page will show in localhost and amp page in localhost?amp=1

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to https://github.com/yassinebridi/amp-prod, the master branch where the problem exist.
  2. deploy

Expected behavior

For the index page to show the non amp page first, and show the amp page, when going to domain.com/index.amp

Links

System information

  • Version of Node.js: v14.2.0

Additional context

This behavior doesn’t occur in dynamic pages, where i would have getStaticPaths too, i didn’t test it though.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tomaszrondiocommented, Oct 23, 2020

nope. I does not help. I opened new issue yesterday about it. #18128

0reactions
balazsorban44commented, Jan 29, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Answers Questions About AMP Indexing
Google has compiled some of the most common questions about indexing AMP pages in search results and answered them in a help thread....
Read more >
Why aren't all of my products indexed on AMP? - Shop Sheriff
When you publish your AMP products, Shop Sheriff generates an AMP page and adds AMP to every single one of your product pages....
Read more >
Blog - Next.js 8.1
Hybrid AMP pages allow you to have an accompanying AMP version of a traditional page so search engines can show the AMP version...
Read more >
AMP status report - Search Console Help - Google Support
This report helps you fix errors that prevent your AMP pages from appearing in Google Search results with AMP-specific features. The top level...
Read more >
Understand how AMP works in search results
Google Search indexes AMP pages for a fast, reliable web experience. Discover how AMP looks in Search and learn about structured data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found