I have the scenario where two links should redirect to the same page, similar to the case of Wikipedia where https://en.wikipedia.org/wiki/Main_Page and https://en.wikipedia.org/wiki/ both point to the same page.
I am using the Django framework. To implement that in Django I can have two different URL patterns in
urls.py, each pattern pointing to the same page.
path('wiki/', views.main_page), path('wiki/main_page', views.main_page)
However, this Google Search Central article about duplicate content seem to note that the above idea isn't' a good idea:
And they seem to advocate the use of 301 redirects:
Use 301s: If you've restructured your site, use 301 redirects ("RedirectPermanent") in your .htaccess file to smartly redirect users, Googlebot, and other spiders. (In Apache, you can do this with an .htaccess file; in IIS, you can do this through the administrative console.)
Does that mean I'd better set 301 redirects using the Django redirect app instead of creating multiple URL patterns?