Qameta Team SEO

Define Canonical URL in a Hugo Theme

Hugo is a static site generator, but links to your site may contain optional params like ref=... which may produce duplicate content for search engines. You can use canonical URL to define, which URL should be used by Google and co. Google has a very detailed description how to consolidate duplicate URLs. If you know Hugo and want just a copy a paste solution, just add this to your head: