Quicktip: Serving a page on its own domain
If you want to serve a landing page or your blog on its own domain or a subdomain, you can render the subpage directly. To achieve this, you can modify the
index.php like this:
With the if statement, we check for the subdomain and serve the blog page if the
REQUEST_URI is the root otherwise we start Kirby like normal.
Depending on context (e.g. if the page contains links to other pages of the site), it might make sense to set the default URL in your
config.php to make sure that other links still point to the main domain.
- You can all a page model for the
blogpage to make sure to render the correct URL in your navigation
- You might want to refine this basic example if you need to make subpages work for this page