Implement sub-domain redirects while using sitecore URL Rewrite module

For all kind of vanity URL redirection we are using URL Rewrite module in our sitecore project which is running fine. For Ex:


Input URL:

Target URL: --> This is handled by URL Rewrite module

Now we have to handle sub-domain redirection as given below:


Input URL:

Target URL:

Input URL:

Target URL:

How should handle these scenario because sub-domain URLs( ) are pointing to some other servers which are actually serving the pages right now

As a starting point first of all we have to change DNS mapping of given sub-domain URL so that those can start pointing to Load balancer IP address

What would be the next step. Assuming we might need to write down some custom code for this

UPDATE: See below Input/Target URL configured in Sitecore and redirection using sitecore URL rewrite module feature

  • Case 2

    Depends on what final URL you would like to show.

    1. If the final URL of someone going to "" should be "" -- The DNS for should point to a server that can handle a 301 redirect to "". This can be done by adding a new site within IIS, adding host name binding for "" and enabling HTTP Redirection to the destination page.

    2. If the final URL should remain "" but display the content from "" then a new Sitecore sites node should be added to the config and be pointed to the content node for /locations. This is a more complicated process and may require additional licensing from Sitecore.

    Typically option 1 would be the correct way to handle this redirect.

  • In reply to Tim Laughlin:

    thanks Tim for your I said we are using Sitecore URL Rewrite module so we can handle #1 with this module as per this post

    I'm about to implement this solution on prod