Redirection / Canonical Issue - IIS Server

Discussion in 'Site & Server Administration' started by arnavlinks, Nov 1, 2014.

  1. #1
    I have a website in html and has it's blog in Wordpress.

    website Server header: Microsoft-IIS/8.0

    X-Powered-By: ASP.NET

    Now, I found that my website domain can be open both with frontslash (/) at the end of domain and without slash (/)

    e.g: www.example.com can also be opened with www.example.com/////

    Also, for inner pages e.g:www.example.com///////////inner-pages.html

    And for blog posts same slash problem:

    e.g: www.example.com/blog//////////my-blog-post/

    Please help me to solve this slash issue. How can the urls be open without the additional garbage slashes?
     
    arnavlinks, Nov 1, 2014 IP
  2. tristanperry

    tristanperry Well-Known Member

    Messages:
    313
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #2
    Within IIS Manager, go to URL Rewrite within your website. One of the 'wizard' rules (under SEO) is "Append or remove the trailing slash".

    You have two options (add or remove the trailing slash) so choose which you would prefer and this should fix it.

    It might also be worth adding the canonical URL within your HTML, too: https://support.google.com/webmasters/answer/139066?hl=en
     
    tristanperry, Nov 2, 2014 IP