Pages as subdomains

Is it possible to have pages as subdomains. So .com/blog becomes

Seen references for kirby v2 but not v3.

Any help massively appreciated.

You’d have to do a URL redirect to

You could render the subpage directly by modifying the index.php:


require __DIR__ . '/kirby/bootstrap.php';

if ($_SERVER['SERVER_NAME'] === '') {
    echo (new Kirby)->render('blog');
} else {
    echo (new Kirby)->render();

Again learned something new, cool.

Brilliant thank you both for your help. :blush:

thank you for this! It’s working on my local server, however the live server doesn’t really understand the locations of my site’s assets anymore.
The generated file paths on local and live server are identical, except of course the base domain name, but all assets paths on the live server, i.e ‘’, are just outputting the generated html of my ‘2019.php’ template…

I’ve tried fiddling around with the DNS settings of my hosting provider, but so far with no results. But to be honest my understanding of how subdomains or DNS works is kind of limited. Maybe could you explain what’s going on under the hood here, and if you have an idea how I can fix this problem? thanks a lot!