Hybrid Index Amp pages always shows the amp version in production.
See original GitHub issueBug 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:
- Go to https://github.com/yassinebridi/amp-prod, the master branch where the problem exist.
- 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
-
This is the repo and the production url for the problem
-
This is the commit without the getStaticProps(where it works as expected):
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:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
nope. I does not help. I opened new issue yesterday about it. #18128
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.