Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2675 karma points MVP 5x c-trib
    Mar 08, 2010 @ 12:33
    Tim
    0

    Issue With Homepage

    Hi,

    How do you guys normally force the homepage of the site to be / in your macros etc?

    I used to just have a UrlName set to '/' but I've noticed problems with this when you force trailing slashes on the end of your URLs. Basically, everything one level deep is rendered as the homepage, for example '/cheese/' shows the homepage, even when no such page exists. If I take off the UrlName, it works as expected (ie the correct one level pages, and 404s for non-existant URLs).

    This isn't a problem if you are using extensionless urls without the trailing slash, but for this project I have to, to avoid nuking a sites SEO rankings with unnessesary 301s. As a quick fix, I've just added an if statement around my sitemaps etc to show a '/' for the root node, overrdinig what's there (currently '/home').

    Are there any better ways of getting the root node to show up as '/'?

    I've done a fair bit of research into getting Umbraco to work with and without trailing slashes for SEO (I'm currently working at an SEO agency), I think I'll add something to the docs about it over the next few weeks, with all the rewrite rules that I'm using etc.

    :)

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Mar 09, 2010 @ 10:15
    Lee Kelleher
    0

    Hi Tim,

    If you set a hostname on your root/homepage node, then the NiceUrl will use that domain name instead of it's urlName.

    Try it out, let us know if it works out.

    Cheers, Lee.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies