Settings - URLs and SEO

You can access these settings in the Settings application under the URLs and SEO category.

Alternative URLs (MVC)

Note: The Alternative URLs feature is only available for sites built using the MVC development model. For Portal Engine sites, use Page aliases instead.

Enable editing interface

Enables the editing interface for alternative URLs in the Pages application (after selecting a page in Edit mode, on the Properties -> Alternative URLs tab).

The Alternative URLs feature also needs to be enabled in the MVC application that presents the website. See Enabling alternative URLs for pages for more information.

The setting only controls the visibility of the editing interface. Any existing alternative URLs remain functional even if you disable the setting.

Alternative URLs are only available for pages whose page type has a URL pattern specified. Pages without a URL pattern typically only store content and do not represent actual pages on the website.

Alternative URLs mode

Sets the action that occurs when a visitor accesses a page through an alternative URL.

  • Redirect – the system performs a redirect (with the 301 HTTP status code) to the main URL of the given page. The main URL is determined by the URL pattern of the page type (any macros in the pattern are resolved for the specific page).
  • Rewrite – the alternative URL remains presented in the visitor’s browser. The system rewrites the URL internally to the page’s main URL, so that it can be served by the MVC application.

When using the Rewrite option, we strongly recommend that you render pages with canonical link elements (see Providing canonical URLs for pages). Otherwise rewritten alternative URLs lead to duplicate content issues, which can have a negative impact on the site’s search engine optimization (SEO).

Excluded alternative URLs

A list of text values specifying restricted alternative URL paths (without the prefix of the site’s Presentation URL). If a user attempts to add an alternative URL matching one of the specified values, the system prevents the creation and displays the error message specified in the Alternative URLs error message setting.

Every path value must be entered on a new line. The comparison is case-insensitive.

If you need to exclude a large number of URL paths, you can add the asterisk (‘*’) character as a wildcard to the start or end of values. The wildcard represents any number of characters.

Examples:

  • articles – the articles URL path
  • articles* – all URL paths that start with articles
  • articles/* – all URL paths whose first segment is articles
  • *articles – all URL paths that end with articles
  • *articles* – all URL paths that contain the word articles

Note:

  • The system automatically excludes certain URLs paths, for example paths starting with cms, getmedia or getfile. Such URLs are reserved for page preview links, file requests, internal on-line marketing logging routes, etc.
  • We recommend excluding the URLs paths of any routes in your MVC application’s routing table that do not have matching URL patterns in your site’s page types (i.e. routes not used for the main URLs of content tree pages). Otherwise a conflicting alternative URL may override an important route on your website.
  • If you modify the setting, any existing alternative URLs that match the excluded values remain in the system (visible in the Pages application), but are no longer handled in the routing of the MVC application.

Alternative URLs constraint

A regular expression that restricts which alternative URLs are allowed. The expression is matched against the alternative URL path value (without the prefix of the site’s Presentation URL). If a user attempts to add an alternative URL that does not match, the system prevents the creation and displays the error message specified in the Alternative URLs error message setting.

Use the constraint to define which characters are allowed in alternative URLs or to enforce some type of structural pattern.

By default, the setting contains a pattern that allows upper and lower case alphanumeric characters, underscores (‘_’), hyphens (‘-’), and forward slashes (‘/’). The default constraint is represented by the following regular expression: ^[\w\-\/]+$

If you modify the setting, any existing alternative URLs that do not match the constraint remain active and continue to be handled in the routing of the MVC application.

Warning: We do not recommend allowing characters that have specific meanings in URLs (such as ‘?’ or ‘#’). This could cause users to submit values that result in invalid URLs or incorrect behavior.

Alternative URLs error message

The text displayed in the Pages application when a user attempts to add an alternative URL that either matches an excluded URL or does not fulfill the requirements of the URL constraint.

We recommend writing a user-friendly message that describes how to add suitable alternative URLs according to the restrictions configured for your website.

URL format

Forbidden URL characters

This setting allows you to list additional characters that should be replaced or removed in URLs (page aliases and URL paths).

The following characters are forbidden by default:

\/:*?“<>|&%.’#[]+=„“ and the space character.

If necessary, the default set of forbidden characters can be overridden through the CMSForbiddenURLValues web.config key.

Forbidden characters replacement

Specifies the character that the system uses as a replacement for forbidden characters in URLs.

Allowed URL characters

Determines which characters are usable in URLs by means of a regular expression. Any characters not specified are forbidden. If empty, only the characters specified by the Forbidden URL characters setting are prohibited.

When allowing special characters in the regular expression, they must be preceded by a backslash (\) as an escape character.

Example: Entering a-zA-Z0-9\^ as the value only allows alphanumeric characters and the caret symbol (^) to be used in URLs.

Note: this setting cannot be used to allow the default forbidden URL characters.

Friendly URL extension

Specifies the extensions that the system adds to page URLs.

  • Extensions must be preceded by the period character.
  • You can add multiple extensions separated by semicolons (;).
  • The first extension is used as the default option when generating links and page URLs. Additional extensions are supported in URLs when accessing pages.
  • To allow extensionless URLs, enter a semicolon without any extension.

Sample value: .aspx;.html;.htm;;

Files friendly URL extension

Specifies the extension that the system adds to file URLs.

Example: getfile/<node alias>/myimage.aspx

If empty, file URLs either have no extension or use the given file’s default extension.

If you set this setting to an empty or custom value, you need to allow custom URL extensions by adding the runAllManagedModulesForAllRequests attribute to the <modules> element in the <system.webServer> section of your project’s main web.config file.

Excluded URLs

Specifies a list of URLs that are excluded from the URL rewriting engine. By excluding the URLs of physical pages stored inside the web project directory, you can improve their page load performance and also prepare scenarios with custom URL rewriting logic.

Warning: Do not exclude the URLs used by the regular pages in the website’s content tree.

To disable URL rewriting for pages, enter the matching URL paths:

  • Use URL paths without the website’s domain name or virtual directory.
  • The paths must always start with a forward slash (/), without the virtual path designator (~).
  • Entering a value excludes all URLs that start with the given path, including sub-directories and all possible extensions.
  • You can enter multiple URLs separated by semicolons (;).

Sample values:

  • /Custom.aspx – excludes the ~/Custom.aspx page stored directly under the website’s root.
  • /Custom – excludes all pages whose URL path starts with /Custom, for example: /Custom.aspx, /Custom2.aspx, ~/Custom/Page.htm
  • /Custom;/Static – excludes all pages whose URL path starts with /Custom or /Static.

Page URLs

Default URL path prefix

Defines a default URL path prefix that will be used for all URLs of the content pages. This prefix is rewritten to urlpathprefix query string parameter.

Use name path for URL path

If selected, the name path of pages will automatically be copied into their URL path when they are saved.

Use permanent URLs

If selected, URLs of pages and page attachments will be generated in permanent format. If cleared, friendly URLs will be used. Learn more in Linking pages and files.

Remember original URLs when moving pages

Determines if new page aliases should be created when a new page URL path or extension is set.

Automatically update page alias

If selected, the alias of a page is automatically updated to match any changes in the name of the given page in the default culture. Also, the page alias property will not be editable manually.

Search engine optimization (SEO)

Google sitemap URL

Sets the URL where the website’s Google (XML) sitemap can be accessed. The entered value is added to the website’s domain to form the final URL. The internal path to the page responsible for generating the sitemap can be specified through the Google sitemap path setting.

Google sitemap path

Specifies the path of the page used to generate the website’s sitemap. This page must contain the Google Sitemap (XML Sitemap) web part. If left empty, a full sitemap of the website is automatically generated by the ~/CMSPages/GoogleSiteMap.aspx system page.

This only sets the internal path of the sitemap. The actual URL where web crawlers can read the sitemap is determined by the value of the Google sitemap URL setting.

Robots.txt path

Specifies the path of the page used to provide the website’s robots.txt file. This page should contain a Custom response web part configured to generate the required robots.txt content.

Regardless of the selected page’s location in the content tree, its output is returned whenever the <website domain>/robots.txt URL is requested.

Allow permanent (301) redirection

If selected, the system uses permanent (301) redirection instead of standard temporary (302) redirection. This is highly recommended, because it allows web crawlers to properly react to any changes made on your website and pass page rank to the new or main URL.

Move ViewState to the end of the page

If selected, the system places the ViewState field at the end of the output code generated for pages. This helps search engine crawlers process more page content.

Use NOFOLLOW for user links

If selected, the system instructs search engine crawlers (robots) not to follow links posted by users on forums, message boards or in blog comments. This is achieved by including the rel=“nofollow” attribute in the output code of all such link tags.

This precaution can help prevent user-generated links from damaging the search ranking of your website.

Default replacement page

The entered page path is loaded as the default value of the Replacement page field if users choose to specify an alternate page while deleting a page in the Pages application.

If necessary, users can override the default value and set a different replacement page path.

SEO - URLs

Use URLs with trailing slash

Specifies how the rewriter handles trailing slashes in URLs. Possible options:

  • Leave the URL as is
  • Always use URLs with a trailing slash
  • Always use URLs without a trailing slash

Redirect page aliases to main URL

Enabling this setting ensures that pages always have only one valid URL and other aliases are redirected to this main URL (for SEO purposes). The main URL of a page is determined either by its alias path, or custom URL path if one is specified.

Note: You can override this setting for individual page aliases through their Alias redirection property.

Redirect invalid case URLs to their correct versions

Determines how the system handles the letter case of characters in URLs. Available options:

  • Do not check the URL case
  • Use the exact URL of each page
  • Redirect all requests to lower case URLs
  • Redirect all requests to upper case URLs

Redirect pages to main extension

If selected, the system ensures that all page URLs use the current main extension. The main extension is the first one specified in the Friendly URL extension setting. Any URLs with a different extension are automatically redirected to a corresponding URL with the main extension.

Process domain prefix

Determines how the rewriter handles the www domain prefix in the website’s URLs. You can leave the domain as it was entered or have it rewritten to either always or never include the www prefix.

Note: That this setting does not apply for IP addresses and top‑level domains.

Default page

Allows you to redirect (permanent 301) all possible URLs that access the home page of your website to one single URL. Using a unified home page URL is highly recommended, because it prevents the duplicate content problem on your website’s most important URL.

You can choose from the following options for the home page URL:

  • Not specified – supports all possible home page URLs and does not perform any redirection.
  • Use domain root – always uses the base URL of the website’s domain name.
  • Use page defined by default alias path – always uses the URL of the page specified by the website’s Content -> Default alias path setting.
  • Use default page URL – always uses the default URL: <domain>/default.aspx

SEO - Cultures

Force domain culture

If selected, the system generates the domain name in page URLs based on the current content culture. Whenever a user switches to a different language on the website, the URL is redirected to the corresponding domain name.

You can assign cultures to domains by editing your site in the Sites application:

  • Set the culture of the website’s main domain through the Visitor culture property on the General tab.
  • To define domain names for other languages, create Domain aliases with an appropriately set Visitor culture.

Note: You cannot use this option in combination with language prefixes.

Use language prefix for URLs

If selected, the system generates page URLs with language prefixes. A language prefix is a subdirectory inserted into the URL. The name of the prefix matches the culture code (or culture alias) of the content culture selected on the website.

Example: <domain>/en-US/Home.aspx

Allow URLs without language prefixes

If selected, URLs without language prefixes are allowed. Otherwise the system redirects such URLs to a corresponding URL that includes a language prefix.

Only applies if Use language prefix for URLs is selected.