Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstrauss's avatar

Adding blog subdomain to Laravel App

I have a Laravel app hosted on Digital Ocean through Forge. The site address is like https://sitename.com. I want to add a subdomain like https://blog.sitename.com. I see that you can add a new site through the Forge GUI but I'm not 100% sure that's the right way to do this. Even if it is, what's the next step? Do you need to adjust the A record through Digital Ocean? And finally, do I need to create a new Github repository and add the Wordpress (or whatever blogging system) to that repository? Any help you can offer is appreciated, thanks.

0 likes
1 reply
kfirba's avatar
kfirba
Best Answer
Level 50

@mstrauss Hey.

If you are going to host the blog and your website on the same server, all you need to to is to make sure that any subdomain is also pointing to your current server IP. You can do that with an A/CNAME record. I would just point a wildcard *.

Now just create another website with Forge on that same server. What happens behind the scenes that Forge will create a virtual host so when people access blog.sitename.com they will be served from another directory than when they access sitename.com.

If your blog is going to be hosted on a completely new server, then just ensure that in your DNS records you make an A record for the subdomain that points to the new server's IP address.

1 like

Please or to participate in this conversation.