Evgenii Legotckoi
Evgenii LegotckoiAug. 20, 2023, 9:51 a.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.

We recommend hosting TIMEWEB
We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.

Do you like it? Share on social networks!

Comments

Only authorized users can post comments.
Please, Log in or Sign up
m

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:80points,
  • Rating points4
m

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:20points,
  • Rating points-10

C++ - Тест 003. Условия и циклы

  • Result:42points,
  • Rating points-8
Last comments
A
ALO1ZEOct. 19, 2024, 8:19 a.m.
Fb3 file reader on Qt Creator Подскажите как это запустить? Я не шарю в программировании и кодинге. Скачал и установаил Qt, но куча ошибок выдается и не запустить. А очень надо fb3 переконвертировать в html
ИМ
Игорь МаксимовOct. 5, 2024, 7:51 a.m.
Django - Lesson 064. How to write a Python Markdown extension Приветствую Евгений! У меня вопрос. Можно ли вставлять свои классы в разметку редактора markdown? Допустим имея стандартную разметку: <ul> <li></li> <li></l…
d
dblas5July 5, 2024, 11:02 a.m.
QML - Lesson 016. SQLite database and the working with it in QML Qt Здравствуйте, возникает такая проблема (я новичок): ApplicationWindow неизвестный элемент. (М300) для TextField и Button аналогично. Могу предположить, что из-за более новой верси…
k
kmssrFeb. 8, 2024, 6:43 p.m.
Qt Linux - Lesson 001. Autorun Qt application under Linux как сделать автозапуск для флэтпака, который не даёт создавать файлы в ~/.config - вот это вопрос ))
Qt WinAPI - Lesson 007. Working with ICMP Ping in Qt Без строки #include <QRegularExpressionValidator> в заголовочном файле не работает валидатор.
Now discuss on the forum
jd
jasmine disouzaOct. 28, 2024, 4:58 a.m.
GeForce Now India: Unlocking the Future of Cloud Gaming GeForce Now India has a major impact on the gaming scene by introducing NVIDIA's cloud gaming service to Indian gamers. GeForce Now India lets you stream top-notch PC games on any device, from b…
9
9AnonimOct. 25, 2024, 9:10 a.m.
Машина тьюринга // Начальное состояние 0 0, ,<,1 // Переход в состояние 1 при пустом символе 0,0,>,0 // Остаемся в состоянии 0, двигаясь вправо при встрече 0 0,1,>…
J
JacobFibOct. 17, 2024, 3:27 a.m.
добавить qlineseries в функции Пользователь может получить любые разъяснения по интересующим вопросам, касающимся обработки его персональных данных, обратившись к Оператору с помощью электронной почты https://topdecorpro.ru…
JW
Jhon WickOct. 1, 2024, 3:52 p.m.
Indian Food Restaurant In Columbus OH| Layla’s Kitchen Indian Restaurant If you're looking for a truly authentic https://www.laylaskitchenrestaurantohio.com/ , Layla’s Kitchen Indian Restaurant is your go-to destination. Located at 6152 Cleveland Ave, Colu…

Follow us in social networks