|OS type and version||Ubuntu LTS 20.04|
Requirement: Set up canonical URL’s in Virtaulmin, so that search engines only index the www version of any website page.
I am trying to figure out how to use canonical URLs with Virtualmin websites.
The reason is for SEO purposes, so that the search engines recognise https://www.mydomain.com as the authoritive source.
I have tried the normal route using permanent redirect 301 (apache redirects), updating .htaccess etc
However, these both result in a webpage error with too many redirects.
I can add canonical tags, but I would prefer the use of canonical URL’s if possible.
I do have an Apache redirect in place already for http to https:
FcgidMaxRequestLen 1073741824 RedirectMatch ^/(?!.well-known)(.*)$ "https://www.mydomain.com/$1"