Remove sitename from site urls

Targutai Yesugei asked on July 6, 2017 06:29

Hello! I want to remove sitename from all urls, so foo.com:port/sitename{%relativepath%} should become just foo.com:port{%relativepath%}

I tried to add new domain alias with field values as following: Domain alias - foo.com:port Default alias path - / Redirect url - foo.com:port{%relativepath%} But it wasn't worked (error 404).

Also i found pretty old paper which describes my problem solving solution: https://devnet.kentico.com/articles/set-a-domain-name-to-be-a-default-alias-path-in-url And when i proceed all the steps, it also wasn't worked - error 404 too.

Can someone provide me guidance about my problem?

Correct Answer

Brenden Kehren answered on July 6, 2017 15:06

This is most likely because your website is setup as an application in IIS. So although your physical file system is set at c:\inetpub\wwwroot\kentico10 your website is setup as an application in that website. So something like c:\inetpub\wwwroot\kentico10\kentico10.

Take a look in IIS and if you have anything like what is in the red box below, then you have sub applications setup in IIS.

Image Text

If this is the case, delete the application in IIS and go to the root of the website and right click and go to Manage Website>Advanced Settings. In there, change the path of the website to the physical path on your machine. It has to be inside the \CMS directory. So if your Kentico install is located in C:\inetpub\wwwroot\Kentico10 you need to have the path set to C:\inetpub\wwwroot\Kentico10\CMS

0 votesVote for this answer Unmark Correct answer

Recent Answers


Chetan Sharma answered on July 6, 2017 15:05

SiteName is usually never part of NodeAlias or NodeAliasPath unless you've written some custom code to override in the database.

How are you generating these URLS?

Thanks, Chetan

1 votesVote for this answer Mark as a Correct answer

Targutai Yesugei answered on July 10, 2017 09:26

Brendan was right, thank you!

Chetan, thank you for your suggestion!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.