Evgenii Legotckoi
Aug. 20, 2023, 7:51 p.m.

Choosing a Canonical URL

I started working on one small Django project and after creating a Minimum Viable Product , I launched it immediately into the online space so that it would start to be indexed by search engines.

Thus, I expect that at the initial stage I will be able to quickly correct indexing errors and immediately improve the site.

So when I saw this post from Google Search Console today:

> The page is a copy. The canonical variant was not selected by the user.

Essentially, the problem from Google Search Console's point of view is that the site is accessible both with and without the www address.

Solution

To begin with, I decided to fix this in the most rude way, namely, add a canonical link to the required page without www in the head tag. The disadvantage of this solution, I think, is that the canonical link will also be present on the page that is canonical. I did not find information that this is not allowed, so I do not know how search engines will perceive this. So I'll just see what the result of the check will be.

The code itself looks like this now

<link rel="canonical" href="https://example.com{{ request.path }}">

Post scriptum

Recently, I have had a lot of thoughts and ideas for a variety of articles, but I just physically do not have time to deal with all areas. And then Diablo IV and Baldur's Gate III came out... In general, complete darkness in the time management.

Therefore, I will simply write notes that will not always look like articles, but will contain bits of useful information.

Recommended articles on this topic

By article asked0question(s)

1

Do you like it? Share on social networks!

Comments

Only authorized users can post comments.
Please, Log in or Sign up
  • Last comments
  • Evgenii Legotckoi
    March 9, 2025, 9:02 p.m.
    К сожалению, я этого подсказать не могу, поскольку у меня нет необходимости в обходе блокировок и т.д. Поэтому я и не задавался решением этой проблемы. Ну выглядит так, что вам действитель…
  • VP
    March 9, 2025, 4:14 p.m.
    Здравствуйте! Я устанавливал Qt6 из исходников а также Qt Creator по отдельности. Все компоненты, связанные с разработкой для Android, установлены. Кроме одного... Когда пытаюсь скомпилиров…
  • ИМ
    Nov. 22, 2024, 9:51 p.m.
    Добрый вечер Евгений! Я сделал себе авторизацию аналогичную вашей, все работает, кроме возврата к предидущей странице. Редеректит всегда на главную, хотя в логах сервера вижу запросы на правильн…
  • Evgenii Legotckoi
    Oct. 31, 2024, 11:37 p.m.
    Добрый день. Да, можно. Либо через такие же плагины, либо с постобработкой через python библиотеку Beautiful Soup
  • A
    Oct. 19, 2024, 5:19 p.m.
    Подскажите как это запустить? Я не шарю в программировании и кодинге. Скачал и установаил Qt, но куча ошибок выдается и не запустить. А очень надо fb3 переконвертировать в html