I am confused about adding canonical link in my website.
I have a website
https://example.com and I have added Redirect to
www from hosting provider(firebase) config.
So if a user accesses my non-www
https://example.com, it will automatically redirect to
For the purpose of SEO I have added canonical link in header as follows
<link rel="canonical" href="https://www.example.com/">
Is the above canonical link is correct?