By using AWS re:Post, you agree to the Terms of Use

Amplify and Google Search


Hi, I hope I can explain this succinctly! I have a Docusaurus site hosted on AWS Amplify. I have the domain set up and it resolves correctly to

The problem I'm facing is that the url that shows up in Google Search is the original amplify url. e.g.

I'm no expert (!) but it looks like the canonical metadata is the bit I need to change. Is there anything I can do via the console (or otherwise) to resolve this?


asked 7 months ago53 views
1 Answer

Since your website can be accessed by multiple urls, you need to tell the search engine which URL is the canonical URL. One way to do it is to add a link tag in your pages <head> to point to the canonical url.

example: <link rel="canonical" href="" />

More info can be here:

profile picture
answered 7 months ago
  • Thanks Mohamed. When I do a URL inspection in Google Search the Amplify link is the 'User-declared canonical'. I have not explicitly/ intentionally declared this so was hoping there might be something in the Console to allow me to specify this (e.g. it seems AWS is setting it). This site is for documentation so we've got 100s of pages - I'm hoping not to need to do this for each page individually!

  • I inspected your website and see that you have <link data-react-helmet="true" rel="canonical" href=""> in your website. You need to edit that.

  • I am not a Docusaurus expert but I think you are defining the url somewhere in your config, and Docusaurus is automatically injecting the canonical tag link for you

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions