umbracoUrlAlias is designed to allow you to have multiple urls listed for a particular page, you just add a comma separated list of 'alias' urls.
However Umbraco just allows the underlying content to be loaded at the 'alias' url - it returns a 200 code, and does not perform a redirect to the original url.
If you concern for this is google ranking problems, eg the same content being served on different urls - the consider adding a <link rel="canonical" (canonical link) to the head section of your template pointing to the one true best url for this page, search engines will then amalgamate ranking for all urls that point to the content underneath the canonical one and you won't be penalised.
If you want an actual 'redirect' from one Umbraco node to another to take place - eg effectively creating a dummy node to just serve as the redirect you can use a special property called umbracoRedirect (that you use with a content picker) to perform a redirect when that node is visited - however this will only issue a 302 temporarily moved redirect.
or create your own redirect document type, and create your own code to perform the 301 redirect, in a template or controller, when that node is requested, having the target redirect url as a property of the 'redirect' doc type.
I was looking at the same thing.
Of course we have multiple authors who don't keep track of their alternate URLs so Google Analytics and page tracking becomes a bit of a nightmare tracking everything down in a 300 plus page website.
Is there a way to export all the alias usages per page? Something like a CSV or Excel file export for all the umbracoUrlAlias property usages per page?
umbracoUrlAlias redirect to original page
Hi team,
I' using umbracoUrlAlias in my project.
Let's say that I have a page:
For this page I set a umbracoUrlAlias as:
If I acces /alternativeurl I would like to be redirected to /mysamplepage
Is this possible? right now I see the page from /mysamplepage but the URL from browser is /alternativeurl
I need this because in Google Analitycs I see two different pages and I would like to see only /mysamplepage
Thanks, Florin
Hi Florin
umbracoUrlAlias is designed to allow you to have multiple urls listed for a particular page, you just add a comma separated list of 'alias' urls.
However Umbraco just allows the underlying content to be loaded at the 'alias' url - it returns a 200 code, and does not perform a redirect to the original url.
If you concern for this is google ranking problems, eg the same content being served on different urls - the consider adding a
<link rel="canonical"
(canonical link) to the head section of your template pointing to the one true best url for this page, search engines will then amalgamate ranking for all urls that point to the content underneath the canonical one and you won't be penalised.If you want an actual 'redirect' from one Umbraco node to another to take place - eg effectively creating a dummy node to just serve as the redirect you can use a special property called umbracoRedirect (that you use with a content picker) to perform a redirect when that node is visited - however this will only issue a 302 temporarily moved redirect.
To issue a 301 moved permanently redirect, you can use a package such as https://our.umbraco.org/projects/developer-tools/301-url-tracker/
or create your own redirect document type, and create your own code to perform the 301 redirect, in a template or controller, when that node is requested, having the target redirect url as a property of the 'redirect' doc type.
regards
Marc
I was looking at the same thing. Of course we have multiple authors who don't keep track of their alternate URLs so Google Analytics and page tracking becomes a bit of a nightmare tracking everything down in a 300 plus page website.
Is there a way to export all the alias usages per page? Something like a CSV or Excel file export for all the umbracoUrlAlias property usages per page?
You could do that with a template and loop through every page of the site and format it however you want, CSV, HTML table, etc.
We do it for page audits somewhat often.
Hope that helps.
is working on a reply...