skip to Main Content

We have a Kentico v9.0 project where the Content Tree is established as follows (greatly simplified as it’s a 4000+ page website).

  • Root
    • Home
      • Products
      • About Us
      • News
      • Contact Us

We want the Home page to be available from the root of the domain name http://domain-name.com/ rather than http://domain-name.com/home

Our SEO team want the level 1 pages aliased like so:

  • /products
  • /about-us
  • /news
  • /contact-us

Rather than:

  • /home/products
  • /home/about-us
  • /home/news
  • /home/contact-us

I’ve attempted to follow the steps outlined in this old v7.0 article https://devnet.kentico.com/articles/set-a-domain-name-to-be-a-default-alias-path-in-url

However I have run into a problem at Step 4. When I tried to rename my Alias Path for the Home page to just / the CMS automatically sets the Alias Path to . I assume this is because the forward slash is considered an invalid character.

Can someone please advise if this method is still supported in v9.0 and if so how I can achieve it?

3

Answers


  1. I wouldnt follow that article for a V9 site. Instead Go to Settings > Content. Under website content > make Default Alias Path: /home

    Login or Signup to reply.
  2. Kentico automatically add all previous aliases if you have a structure like this. In

    CMS_Tree table -> NodeAliasPath column

    you can actually see how the whole path looks like. This path is updated whenever you update/create node alias which is part of the structure.

    In case you wan’t to omit the “Home” completely you have 3 options:

    1) Remove the “Home” page and move all pages directly under the root

    2) Use custom url path by configuring the Path or pattern property:

    Path or pattern property

    3) Create page alias which also uses the custom path or pattern:

    Page alias with custom path

    If you want to ensure that a page is accessible only by 1 url, you can enable the Settings -> URLs and SEO -> Redirect page aliases to main URL

    Note: You could also create an IIS rewrite rule, but this wouldn’t change how the URLs are rendered on your pages and it wouldn’t probably be a good idea to rely on rewrite for just this purpose.

    Login or Signup to reply.
  3. you can do an update to the db to add the DocumentURLPath. This will write over any url paths that may have been entered, but it remove /home from the paths.

    update cms_document set DocumentURLPath = Replace(Replace(DocumentNamePath,' ','-'),'/home','')
    

    You could also try doing a mass move. In Pages select the home page & click Listing (top of content tree) that will list all of the pages in the home page. Then you could select all of them and move them to the root. Moving the inner pages shouldnt affect the template of the home page at all. If you are using a repeater on the home page to look at content in the inner pages, you can just re-point the path in the repeater.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search