Copied to clipboard

Flag this post as spam?

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


  • BarneyHall 141 posts 210 karma points
    Nov 12, 2009 @ 12:10
    BarneyHall
    0

    SEO request : flat URLS + trailing "/"

    Hello,

    Is it possible to add a trailing slash to flat URLs?

    For example, http://domain.com/home/ rather than http://domain.com/home

    I have flat URLs configured but this falls short of including the trailing "/".

    Any idea how or where this might be configured?

    Many thanks,
    Barney

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Nov 12, 2009 @ 13:11
    Niels Hartvig
    0

    I remembered I asked if this had any SEO impact months back on this forum. Can anyone confirm that it's the case? Then we'll add it as an option for 4.1...

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Nov 12, 2009 @ 13:11
    Niels Hartvig
    0

    (currently it's not possible without hacking the core)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 12, 2009 @ 13:16
    Dirk De Grave
    1

    Do you need to hack the core? Can't you write a small xslt extension method that takes the output from NiceUrl() and adds a trailing slash?

     

    Cheers,

    /Dirk

  • BarneyHall 141 posts 210 karma points
    Nov 12, 2009 @ 14:21
    BarneyHall
    0

    Thanks, that appears to work.

    In my navigation XSLT (taken from CWS2) the following works for node URLs beyond level 1.

    <a href="{umbraco.library:NiceUrl(@id)}/">
        <xsl:value-of select="@nodeName" />
    </a>

    Had to watch out for the homepage node though, as a trailing slash on the node name of "home" as http://domain.com/home/ bombs.

    This got set to:

    <a href="/">
         <xsl:value-of select="$rootNode/@nodeName" />
    </a>

    Also put a redirect in UrlRewriting.config to pick up the node URL of http://domain.com/home to redirect back to the root.

            <add name="home"
                 virtualUrl="~/home"
                 destinationUrl="~/"
                 redirect="Application"
                 redirectMode="Permanent"
                 ignoreCase="true" />

    Cheers,
    Barney

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Nov 12, 2009 @ 16:14
    Casey Neehouse
    0

    @niels,

    I offered my two cents that a client of mine required it because it has a 'significant impact' on rankings, as most search engines see default pages of directories more important.

    I feel it may be a stretch, but would love the ability to configure the extension or trailing slash in config. 

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Nov 12, 2009 @ 16:48
    Warren Buckley
    0

    Hmm I am no SEO expert but the dealings I have had with them in the past they can be very specific about little details like this.

    So if we could have it as an option/config in the 4.1 release that would be ace then people can decide for themselves if its important to them, rather than hacking the core. As I wouldn't be a fan of doing that if i needed to roll out URLs with / on the end.

    As hacking the core, means its alot harder for support and an upgrade path in my opinion.

    Is there a bug/feature request for this on Codeplex that could be voted up?

    Warren :)

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Nov 12, 2009 @ 17:21
    Niels Hartvig
    1

    I've heard both - that it has an impact and it doesn't. Would love to see so documentation on either, but I'm cool with config for adding optional end of string. That could be used for "/" or even ".html" if people prefer :)

    Anyone up for creating a codeplex workitem for 4.1 (else I'll do it :))?

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Nov 12, 2009 @ 17:22
    Niels Hartvig
    0

    @Dirk: the xslt extension will work in xslt's but not locallinks

  • Jose Malone 121 posts 58 karma points
    Nov 13, 2009 @ 21:09
    Jose Malone
    0

    I do a lot of SEO in my trade and this has never come up. Are you only talking about adding slashes to only directories or behind every page?

    www.mysite.com/home/

    as well as

    www.mysite.com/ideas/place-ending-slash.html/

    Personally I think having the ability to install Umbraco in a Virtual Directory so sites can have their own IP address would be a better investment of time for SEO if you're trying to help make Umbraco more SEO friendly.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 14, 2009 @ 11:50
    Chris Houston
    0

    Hi Jose,

    You do not need virtual directories to allow sites to have their own IP addresses, you create multiple sites and assign each site with a different IP address.

    In theory I am guessing if you had multiple sites running off the same web site within IIS, you could assign multiple IP addresses to the same IIS site and just map different host names for each of your sites so then they will all only work on their respective seperate IP addresses but from a single Umbraco installation.

    I hope that made sense :)

    Cheers,

    Chris

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Nov 14, 2009 @ 23:37
    Warren Buckley
    0

    Niels did you ever create that work item on codeplex, that I can vote on?

    Warren :)

  • Jose Malone 121 posts 58 karma points
    Nov 15, 2009 @ 23:38
    Jose Malone
    0

    Chis,

    That's the problem. It's a theory. I've asked about this before and it seems like a LOT of work for something that is just built-in with IIS (Virtual directory, hostheaders; BANG - you're done. Seperate sites and seperate IPs.) Plus in my case the websites/clients having nothing to do with eachother so virtual directories is a much cleaner way to offer FTP and control over the files, and databases, etc. So, a single Umbraco installation isn't actually that apealing or a big need.

    Sincerely,

    Jose

     

     

     

     

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 16, 2009 @ 00:10
    Chris Houston
    0

    Hi Jose,

    I have multiple seperate Umbraco sites running on the same IIS server and each one is setup as a seperate "website" within IIS. A lot of people mention wanting to use virtual directories, but would be the reason for using virtual directories instead of seperate IIS web sites which in my mind is a much cleaner way of keeping client sites seperately?

    I am probably missing something obvious.. :-)

    Cheers,

    Chris

  • dillorscroft 198 posts 192 karma points
    Nov 16, 2009 @ 01:17
    dillorscroft
    0

    Jose,

    I've read and re-read you post a few times to see if I'm missing something but  I can't see it.  

    For what reason would you want to use virtual directories?   A virtual directory is literally just that a directory, inside a website.

    If I had a website www.website.com and created a virtual directory for another client it would be www.website.com/anotherclient.  Are you sure you arent confusing this with creating a new Umbraco instance/website running on the same server?   i.e. have www.website.com and www.anotherclient.com on the same server?    This is not the samething as virtual directories.  Perhaps its semantics that's confusing Chris and myself.   Hope I'm not being to obvious here but of course this is possible....

    Nobody is advocating running multiple websites for different clients in the same Umbraco instance i.e. One Umbraco site and multiple websites (Which is technically possible although I'd only ever do this to allow a company to mange their own sites or different language versions.)

    As for the trailing slash I do think it is a big requirement and an easy win for Umbraco.  There is definetly a difference in Google's eye between www.site.com/blog and www.site.com/blog/   The trailing slash does distinguish between a directory and an extensionless file.  I'm going to modify the core until 4.1 is available.  I hope I'm right in saying it's just the NiceUrl method that needs changing in the umbraco.library.


    DC

     

     

      

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Dec 19, 2009 @ 15:29
    Morten Bock
    0

    @Niels, why not go all the way and make it a providermodel, so people can plug in their own UrlReader/UrlWriter ?

  • Rik Helsen 670 posts 873 karma points
    Jan 06, 2010 @ 16:04
    Rik Helsen
    0

    There isn't a reason in the world why a trailing slash would improve seo

Please Sign in or register to post replies

Write your reply to:

Draft