When it comes time to switch over your domain name from your old hosting to your new CWP hosting, there's a few things you need to know as a developer or system administrator.

Background

CWP uses Incapsula(external link), a Web Application Firewall (WAF). All requests to your stack must pass through Incapsula.

Basic DNS Configuration

Your stack page in the CWP Service Desk will list a primary domain name. This is what is configured in Incapsula, and what Incapsula and CWP both expect to see for incoming requests. Lower down on the page is the DNS configuration you need to use for your domain.

Your primary domain for the stack should use the A record. This is usually the “naked domain” without www (example.com rather than www.example.com(external link)). It is also called the "apex" record. Incapsula provides two IPs for the A records, which is a standard redundancy measure. Please add both of them. Example:

A {xx.xx.xx.xx}
A {yy.yy.yy.yy}

For subdomains of your primary domain (including www.*), please use the CNAME record instead. This is important for Incapsula to determine which domains should be mapped to your Incapsula account.

CNAME {xxxxx}.x.incapdns.net

Note that you can't "preview" these DNS switches through manually mapping DNS records (e.g. through your own /etc/hosts file or a local DNS server). Incapsula relies a reverse lookup of the public CNAME DNS record to determine how a site is mapped to CWP accounts. Therefore it is important to switch both DNS records mentioned above at the same time in order to avoid any downtime on your website.

DNS for multiple domains 

Your stack page will show your primary domain name, and a list of additional domain names. You can point the DNS entries of multiple domains to the same CWP stack. This can be used to either create alternative domains for your website, or in combination with the CWP “subsites” module.

Example setup:

  • Primary:
    • example.com
  • Additional:
    • www.example.com
    • second.example.com
    • www.second.example.com
    • third.com
    • www.third.com

Your additional domains, regardless if they are a subdomain of your primary or not, should be configured the same as your primary domain name. Example configuration with two subsites (second.example.com and third.com):

example.com             A {xx.xx.xx.xx}   A {yy.yy.yy.yy}
www.example.com         CNAME {xxxxx}.x.incapdns.net
second.example.com A {xx.xx.xx.xx}   A {yy.yy.yy.yy} www.second.example.com CNAME {xxxxx}.x.incapdns.net
third.com A {xx.xx.xx.xx}   A {yy.yy.yy.yy} www.third.com CNAME {xxxxx}.x.incapdns.net

Limitations:

  • Your subsite DNS configuration requires you to have a www subdomain of each subsite with a CNAME. Having the A records only will not work.
  • If you use SSL then you’ll need to use a single certificate for all domains via a wildcard certificate.
  • Any caching and security rules configured within Incapsula will be identical for all of your domains.
Adding new domains

For any new domains that you intend to point to your environments the service desk must be made aware before you make the DNS change. This is so that the domains can be configured in the relevant servers to correctly route to your environment. To make the service desk aware of new domains raise a ticket of the type "Alter domain names associated with a Stack".

See also:

 

Last modified: