We launched the multi-tenant WordPress Marketplace! 🎉

Branded temporary domains for your tenants

sybren@wpcs.io

When your tenant does not have its main domain yet (maybe it hasn’t been bought yet or it still points to an old site), you might want to give tenants a prettier temporary domain than the one generated by WPCS.

In this recipe, we will go through the steps to create tenants with pretty temporary domain names via the WPCS API.

Providing branded temporary domains

Say you sell your product under the domain name my-awesome-product.com, it could make sense to give your customers a temporary domain name like acmeinc.my-awesome-product.com.

Setting this up starts at your DNS provider. You can create a CNAME record for *.my-awesome-product.com which points to public.eu1.wpcs.io.

Next, set up your API calls to provide a unique customDomainName. You might choose to use your tenant’s company name for example. If your tenant signs up with the company name ‘John Doe Inc’, you can provide the domain name johndoeinc.my-awesome-product.com. Your whole POST request might look like this:

{    "name": "John Doe Inc",    "customDomainName": "johndoeinc.my-awesome-product.com"}

Because your DNS has already been set up with a CNAME record, this custom domain name will verify very quickly. Now, you can communicate a branded URL to your tenants!

Build a low code SaaS today

Start a 30-day free trial – Cancel anytime

Plugin name

Author

WPCS

Description

When your tenant does not have its main domain yet (maybe it hasn’t been bought yet or it still points to an old site), you might want to give tenants a prettier temporary domain than the one generated by WPCS. In this recipe, we will go through the steps to create tenants with pretty temporary domain names via the WPCS API.

Code Snippet