When you create a new tenant, it will be available under a domain name like
https://a-tenant-0qkj97c4.tenants.wpcs.io. Not too SEO-friendly, or human-friendly, for that matter. In this document, you'll learn how to add a custom domain to your tenants.
We will assume you already bought a domain name somewhere, and that you can configure its DNS.
Add the domain
Add the domain name in WPCS by clicking
Actions and then
Add domain. Make sure you fill in your domain exactly as you bought it, without www or any other subdomains. If you need your tenant's website to also be available under
www.my-domain.com, add a second domain with the
Add records to DNS
Go to your domain provider and add all A records for the domain’s DNS. The relevant IP addresses are region dependent. You can find the right IP addresses in the console when adding domains.
IPv6 is not supported. This means that if your domain's DNS contains any
AAAA records, you should remove these. It is important to not have any
AAAA records that point elsewhere as this will block the creation of SSL certificates.
It is important to add all A records. Adding only one of these records decreases the reliability of your tenant's website.
It can take up to 24 hours before your DNS changes are available worldwide.
Verify the domain
After a while (it can take up to 24 hours), go back to WPCS and hit the
Verify button. This will check whether the domain name is configured properly to be used for your tenant.
Set as main
When your domain is verified, hit the
Set as main button. This will set the domain as the main domain for that WordPress site. You don’t have to worry about doing a search-replace on the site’s database, we handle all that for you.
If you've added multiple domains for your tenant, the main domain will be used in the database, the other domains will function as redirection domains. WordPress will most likely redirect any of the secondary domains you added in WPCS to the main domain.