Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christopher J. McClellan 9 posts 39 karma points
    Apr 12, 2016 @ 17:43
    Christopher J. McClellan
    0

    Can references to .aspx or index be defeated to avoid duplicate content hits in SEO?

    Case in Point:

    When creating a page in umbraco it creates two paths

    markets-products/building-products/

    and

    markets-products/building-products.aspx

    Many SEO tools pick this up as duplicate content as do search engines.

    Is there any way to force only one instance?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 12, 2016 @ 18:00
    Dennis Aaen
    0

    Hi Christopher,

    You can remove the .aspx extension by modify the web.config file. In the web.config, search for umbracoUseDirectoryUrls.

    If you set it to true, then it strips .aspx from URLs on the front-end w

    This setting is only important to older IIS configurations where extension-less URLs weren't supported very well. See https://our.umbraco.org/documentation/reference/config/webconfig/

    If you want to avoid the trailing slash in the end of you Urls, then you need to change the to false

    <addTrailingSlash>false</addTrailingSlash>
    

    You will find the setting in the umbracoSettings.config which is located in config folder /Config/umbracoSettings.config

    Hope this helps,

    /Dennis

  • Christopher J. McClellan 9 posts 39 karma points
    Apr 12, 2016 @ 19:44
    Christopher J. McClellan
    0

    Hmm. In the site I'm currently working on umbracoUseDirectoryUrls was already set to true but I'm still seeing the .aspx instances. The site is using Umbraco 7.2.6. Any ideas?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Apr 12, 2016 @ 20:22
    Stefan Kip
    100

    You can use my .aspx removal redirect for UrlRewriting.net:

    <!-- SEO | Trim .aspx for directory URLs -->
    <!-- Note: using UrlRewriting.Net because IIS UrlRewriting doesn't like rules with .aspx in it -->
    <add name="SEO | Trim .aspx for directory URLs"
        redirect="Application"
        redirectMode="Permanent"
        virtualUrl="^/(?![0-9]+.aspx)(?!umbraco/)([^\?]*?).aspx$"
        rewriteUrlParameter="ExcludeFromClientQueryString"
        destinationUrl="/$1"
        ignoreCase="true" />
    
  • Rylan 67 posts 251 karma points
    May 08, 2017 @ 15:32
    Rylan
    0

    Hey I'm having the same issue, just trying to get rid of the .aspx because my seo tools are showing duplicate content. I'm running Umbraco 7.5, where would I add this in the web.config?

  • Christopher J. McClellan 9 posts 39 karma points
    Apr 12, 2016 @ 20:40
    Christopher J. McClellan
    0

    Excellent. Thank you for sharing.

Please Sign in or register to post replies

Write your reply to:

Draft