About Canonical URLs
Canonical URLs are used to indicate the preferred version of a webpage when multiple URLs have similar or duplicate content, helping to avoid SEO issues like duplicate content penalties.
Set this in your base.html to make sure that URLs with query parameters are not counted by search engines as separate URLs:
<link rel="canonical"
href="{{ request.scheme }}://{{ request.get_host }}{{ request.path }}" />
Tips and Tricks Development Search Engine Optimization Django 5.2 Django 4.2 Django 3.2
Also by me
Django Messaging 🎅🏼
For Django-based social platforms.
Django Paddle Subscriptions 🎅🏼
For Django-based SaaS projects.
Django GDPR Cookie Consent 🎅🏼
For Django websites that use cookies.