Customized URLs

A customized URL – also known as a vanity URL – is a unique path to a page which has been made human-readable and easily recognizable.

Standard Dynamicweb URLs have an URL slug like this; www.yoursolution.com/Default.aspx?ID=123 where ‘123’ is the ID of the page. When customized URLs are active, the standard URL slug is replaced with a more SEO friendly version; /Default.aspx?ID=123 becomes /blog and /Default.aspx?ID=124 becomes /Store, and so on.

How customized URLs are generated is controlled using two tools:

  • The Customized URLs tool found under Settings > Web and HTTP > Customized URLs
  • Page URL providers attached to a specific page

Page URL providers are a new concept introduced in DW 9.7, and currently acts as an alternative/improvement to the Ecommerce add-in section of the Customized URLs tool. More page URL providers will be released in the future.

In the following sections we will go through your options when configuring custom URLs – unless explicitly mentioned, all these options are available via the Customized URLs tool found under Settings.

In order for customized URLs to function, the 404-handler on the solution IIS server must be correctly configured.

To activate custom URLs for regular pages, select Location and page name as the URL type (Figure 2.1).

Figure 2.1 Customized URLs for regular pages

When Location and page name is selected, you can tweak behavior further:

  • Place all pages in root instructs the URL engine to lave our page structure information and show all pages as if they were placed in the root of the content tree – www.mypage.com/page/subpage would be shown as www.mypage.com/subpage
  • Language layer:
    • Don’t show leaves out the language later information in all URLs – this can lead to conflicts between identically named pages on separate language layers
    • Include language layer includes the language layer in the URL slug, e.g. www.mypage.com/languagelayername/pagename
    • Use ISO code from regional settings includes the ISO code in the URL slug, e.g. www.mypage.com/en-GB/pagename
  • By default, the Dynamicweb URL handler will ensure unique URL extensions by adding a number to URLS with the same extension, e.g. /home-1 and /home-2. If you have a unique domain for each website on your solution, you can check ensure unique paths for each area to disable this behavior, as the URL handler will take the full domain name into consideration when creating URLs and not only the extension.
  • If you group by master website language layers will belong to the same URL index as the master website – should be combined with a language layer setting to ensure unique URLs.

Custom URLs for Ecommerce content – Products and Product Groups – can be configured in two ways;

  • Using the Ecommerce URL add-ins in the Customized URLs tool
  • Using a page navigation provider on a page with a product catalog app attached

When using the Ecommerce add-ins, you can configure how URLs for product groups and products are generated (Figure 3.1).

Figure 3.1 Custom Ecommerce URLs

Your options are:

  • Products:
    • Ecommerce products and variants – e.g. /ProductName and /ProductName/VariantName
    • Ecommerce products – e.g. /ProductName
  • Product groups:
    • Ecommerce group path – e.g. /GroupName/SubgroupName
    • Ecommerce group dash path – e.g. /GroupName-SubgroupName
    • Ecommerce group – e.g. /GroupName. The path to the group is ignored.

Alternatively you can use a Page URL provider – see more later in this article. 

The Customized URL tool can also generate customized URLs for other types of content (Figure 4.1).

Figure 4.1 Other custom URLs

Your options are:

  • Items published via the item publisher app – please ensure that custom URLs are also activated in the item-type settings. URLs are generated based on the page/paragraph names unless Use in URL has been checked in the page page properties settings.
  • News articles published via the old & deprecated News app
  • Manufacturer records
  • Forum entries

A number of customized url setting (Figure 5.1) give you further control over how your custom URLs are generated.

Figure 5.1 Customized URL settings

You can:

  • Use customized URLs for internal links
  • Activate normalization of non-standard latin characters - you can also add your own custom mappings
  • Check Forward to link (301 Moved Permanently) to use 301 forwarding to redirect users and search engines to the new URL. This may prevent a loss of Google page ranking.

The Ecommerce customized URL settings (Figure 6.1) allow you to further control how custom URLs for Ecommerce content works.

Figure 6.1 Customized URLs Ecommerce settings

You can:

  • Check Use strict URL recognition to always return a 404 page if the path to a group, product, variant etc. is not 100% correct. If unchecked and incorrect URL may return e.g. a product from another group.
  • If your Ecommerce contains pages with different URLs but identical content, such as /productlist.aspx and /productlist.aspx?sort=price, you can check canonical links in meta to make the most basic URL canonical and prevent content from being indexed as separate pages by search engines
  • Check 404 for products not in website shop and 404 for products not in website language to return 404-pages when users try and access products outside the shop/language context. Will also return 404 for products not in the right group context.
  • Check include product ID in product URL to activate that behavior

The meta settings (Figure 7.1) allow you to configure meta behavior.

Figure 7.1 Customized URLs meta settings

You can check Use noindex, nofollow for *.dynamicweb.* URLs to tell search engines NOT to index or follow links to Dynamicweb.dk domains. If disabled on *.net.dynamicweb.dk solutions, you will still get a <meta name="robots" content="noindex,nofollow"> in the page source on your *.net.dynamicweb.dk addresses. This is intended behavior. Dynamicweb cannot have pages indexed ending with .dynamicweb.dk or any other Dynamicweb domain, as it breaks SEO for our own Dynamicweb page. You need to buy a domain for your solution.

If your Ecommerce contains pages with different URLs but identical content, such as /productlist.aspx and /productlist.aspx?sort=price, you can check canonical links in meta to make the most basic URL canonical and prevent content from being indexed as separate pages by search engines.

As an alternative to the Customized URLs tool, you can instead use a Page URL provider – a new concept introduced in Dynamicweb 9.7, which generates URLs for all content of a specific type under a page.  Currently, only one page URL provider is available; the Ecommerce page URL provider.

If you use page URL providers you should of course also disable the Ecommerce section of the Customized URLs tool.

To use a Page URL provider:

  • Go to Content and open the page properties for a page
  • Switch to the Options-tab and click the URL button
  • Select a provider and configure it (Figure 8.1)
  • Click OK and save the page properties
Figure 8.1 The Ecommerce page URL provider

Once saved, the URL index is updated with the chosen configuration option for groups, products & variants.

  • Root generates a URL at the root level, e.g. /Nutmeg
  • Tree path generates a URL with the group structure included, e.g. /Spices/Eastern/Nutmeg

To see the current URL index add the following query string parameter to the URL:

?showurlindex=true

Please note that performance scales negatively with the number of instances of page url providers used, as each instance generates a separate URL index.