Problems with canonical link (rel=canonical) created

Yes, it’s a small problem, but it causes damage to the websites’ SEO!

This problem only occurs for the index.html page, its canonical link refers to the root of the project, when it should indicate the index page, which causes problems for SEO, as we have two canonical link references on the site.

For both the domain and the index page the link is the same.

<link rel="canonical" href="https://yoursite.bss.design/">

When should it be:

For the domain

<link rel="canonical" href="https://yoursite.bss.design/">

For the index page

<link rel="canonical" href="https://yoursite.bss.design/index.html">

I think it’s a simple problem with an easy solution.

One note: This fix could lead to another issue with the navigation bar menu’s Smart Active State, so you would need to tell Smart Active State that the index page and site domain should activate the menu that points to both.

Taking advantage of the topic, the sitemap generated by BSS does not include the index.html page.
I don’t want to be boring, just point out possible improvements to the program.

@martin

2 Likes

The app assumes that your web server delivers the index.html page when the domain is visited. Most hosts have this behavior. In this case I think that the index using the main domain as a page is the correct way to do it. The same is true for the sitemap.

Do you serve different pages on your domain from the index page?

I use a Github repository with cloudflare, that should be it then, thanks.