PHP, Creator Economy

Custom Domain Support in Creator Economy Platforms

Most creator platforms support two forms of custom domains:

  • 1. Subdomains - such as
  • 2. Custom domain - such as

Describing the creator domain as part of the URL of the site, such as, is much less common.

If you are about to construct such a platform, you may wonder how complicated it is to build custom domain support.

It turns out it is straightforward.

It boils down to two things:

  1. 1. The user doing setup in their domain registrar or website hosting company
  2. 2. Routing in your platform

Domain Setup by User

You should instruct users to add appropriate DNS records in their domain registrar or hosting company. There are many examples of instructions in existing platforms that you can borrow.

The Transistor podcasting platform instructions that I recently used are excellent.

Routing in Platform

While I do not know which backend programming framework or language you use, the following in Laravel PHP is pretty generic and can be adapted to:

  • 1. Any PHP framework
  • 2. Express.js or any Node.js backend framework
  • 3. Ruby on Rails
  • 4. Java Spring Boot


Route::group(['domain' => '{subdomain}.{domain}.{tld}'], function(){

    Route::any('/', function($sub, $domain, $tld){
        return 'custom domain: ' .  
            $sub . '. ' . 
            $domain .  '. ' . 



Route::domain('{account}')->group(function () {
    Route::get('user/{id}', function ($account, $id) {

Yoram Kornatzky

Yoram Kornatzky