Cogs

Canonical URL Calculator

Please fill in the form below to work out a canonical form for a URL

Enter the URL to be canonicalised. It should be fully qualified, i.e. begin with "http", "https", etc.
Enter your preferred domain name for the canonicalised URL. It should be a fully qualifed domain (including your preferred subdomains), e.g. http://www.mysite.com/. If the input URL is in the same domain as this preferred name, then the preferred name will be used. For example, if the input URL is http://www.mysite.com/ and the preferred domain is http://mysite.com/, then http://mysite.com/ will be used in the canonical URL; however, if the input URL is http://www.my-site.com/ and the preferred domain is http://mysite.com/, then http://www.my-site.com/ will be used in the canonical URL as mysite.com and my-site.com are not in the same domain.
If you would like the index page to be stripped out of the canonical URL, enter it here. E.g. if you enter index.html, then http://www.mysite.com/index.html will be canonicalised to http://www.mysite.com/. If you don't want this to happen then leave this entry blank.
Enter here a comma-separated list of query parameter names to be preserved in the canonical URL. Optionally, provide query parameter values too. Any query parameter you don't specify here may be dropped from the canonical URL, depending on the value of the next checkbox. You can force query parameters to be dropped by preceding them with a minus sign. Example: to always drop the utm_campaign, utm_source, utm_medium query parameters, always keep the referrer and test query parameters, and over-ride the value of test so that it is canonicalised to 5 every time, set this field to -utm_campaign,-utm_source,-utm_medium,referrer,test=5
Comma separated list. Optionally include values
If you check here, any query parameters not named in the "Query string params" field will not appear in the canonical URL. If you leave this ucnchecked, all query parameters in the input URL will appear in the canonical URL unless you sepcifically included them at the prevsiou step using a minus sign.
In most cases the order in which query parameters appear should not make any difference. By sorting the query parameters, you can ensure that they are always presented in the same order, so that they canonicalise to the same URL when necessary. Don't use this option if the order in which query parameters are presented matters on your web site.
Use these options if URL case matters on your site. You should preserve the case of the path and URL parameters on Unix platforms and not on IIS platforms. It is recommended to preserve the case of URL parameter values on all platforms. Where you don't preserve case, the case of the respective component in the canonical URL will be converted to lower case.
Use this option if you want to the output to contain a "base href" tag in addition to a "rel=canonical" tag.
This option controls what happens when the URL path compnent does not end with a file name - I.e. it is a directory. You can force directory paths to end with a slash ("add"); or force them not to end with a slash ("remove"); or leave things as they are ("ignore"). Note that a root URL, such as http://www.mysite.com/, will always end with a slash.