We just raised $735,000 to introduce the world to multi-tenant WordPress.

Branded temporary tenant domains

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!

Related articles

Migrate to WPCS with WPCS Migration Plugin

You can get your sites up and running on the WPCS platform using our free WordPress Migration plugin

Build a Shopify SaaS Clone using WordPress, WooCommerce, WPCS & Kubernetes

Build a WPCS Product in 5 Steps

Build a scalable WordPress SaaS or WaaS (Website as a Service

How to automate your Website as a Service (WaaS) - Storefront included!

How to automate the sale and launch of your websites using a storefront with the WPCS API, WooCommerce, and Uncanny Automator.

Webinar: Merge Sites, Automate, and the Versioning System

Merging your agency’s website portfolio in WPCS where each website has a different tech stack, automate your business with a storefront, and continuously develop your sites like a SaaS.

Getting started with the WPCS Intro Series

Launch your WordPress SaaS in 5 easy steps

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