Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi team,
by default , Umbraco generates the url for the page with the trailing slash like this https://www.mysite.co.nz/contact-us/.
But when we did the SEO testing, Google sees it as 2 different pages (with and without trailing slash) served with similar content, creating a duplicate content issue :
https://www.mysite.co.nz/contact-us/ https://www.mysite.co.nz/contact-us
How can we address this issue ?
Thanks,
A
Hi Adrian
First, disable trailing slash in umbracoSettings.config:
<!-- this will add a trailing slash (/) to urls when in directory url mode --> <addTrailingSlash>false</addTrailingSlash>
Second, add redirect:
<rewrite> <rules> <rule name="Remove slash" stopProcessing="true"> <match url="(.*)/$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Redirect" redirectType="Permanent" url="{R:1}" /> </rule> </rules> </rewrite>
Oleksandr
Hi , Alex, thanks for the advise.
looks like other pages showing fine like this https://www.mysite.online/page1
but the home page still have the trailing slash https://www.mysite.online/
hi Alex, this rewrite rule causing the "Preview" is not working.
Because it changes the js url from
https://www.mysite.co.nz/umbraco/js/canvasdesigner.loader.js
to
https://www.mysite.co.nz/js/canvasdesigner.loader.js.
any chance to exclude this condition ?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Google sees two versions of Umbraco page url issue
Hi team,
by default , Umbraco generates the url for the page with the trailing slash like this https://www.mysite.co.nz/contact-us/.
But when we did the SEO testing, Google sees it as 2 different pages (with and without trailing slash) served with similar content, creating a duplicate content issue :
https://www.mysite.co.nz/contact-us/
https://www.mysite.co.nz/contact-us
How can we address this issue ?
Thanks,
A
Hi Adrian
First, disable trailing slash in umbracoSettings.config:
Second, add redirect:
Thanks,
Oleksandr
Hi , Alex, thanks for the advise.
looks like other pages showing fine like this https://www.mysite.online/page1
but the home page still have the trailing slash https://www.mysite.online/
Thanks,
A
hi Alex, this rewrite rule causing the "Preview" is not working.
Because it changes the js url from
https://www.mysite.co.nz/umbraco/js/canvasdesigner.loader.js
to
https://www.mysite.co.nz/js/canvasdesigner.loader.js.
any chance to exclude this condition ?
Thanks,
A
is working on a reply...