Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Jul 16, 2013 @ 18:03
    Garrett Fisher
    0

    SEO: Removing *.aspx Files from Google Search Results

    Hi,

    I am using directory URLs and my sitemap.xml is clean, but *.aspx files are still showing up in search results.  Anybody have any idea how to remove these native file-extension URLs?

    Thanks,

    Garrett

  • Jamie Pollock 174 posts 853 karma points c-trib
    Jul 16, 2013 @ 18:35
    Jamie Pollock
    0

    Hi Garrett,
    I may be misunderstanding the question here. But, wouldn't adding the following line to robots.txt solve the issue?

    User-agent: * Disallow: *.aspx

    Jamie 

  • Amir Khan 1287 posts 2744 karma points
    Jul 16, 2013 @ 19:02
    Amir Khan
    100

    You should put a 301 redirect on the .aspx files to their non .aspx counterparts by adding this to UrlRewriting.config, this will help you preserve any page rank that was associated with the .aspx pages:

     

    <!-- 301 Directory URLS -->   
    <add name="301RedirectDirUrls"
    redirectMode="Permanent"
    redirect="Application"
    ignoreCase="true"
    rewriteUrlParameter="IncludeQueryStringForRewrite"
    virtualUrl="^\/(?!(umbraco\/|data\/|install\/|usercontrols\/|umbraco_client\/))(.*)\.aspx"
    destinationUrl="$1/$2" />
  • Garrett Fisher 341 posts 496 karma points
    Jul 17, 2013 @ 17:26
    Garrett Fisher
    0

    That markup is a miracle.  THANK YOU Amir!

  • Amir Khan 1287 posts 2744 karma points
    Jul 18, 2013 @ 21:59
    Amir Khan
    0

    Glad I could help, that's definitely been a part of my Umbraco boilerplate for a while now :)

Please Sign in or register to post replies

Write your reply to:

Draft