I an hosting through DigitalOcean’s Ubuntu servers, and I would like to make use of subdomains. I would like to have a homepage as example.com and then two links with one being subdomain1.example.com and the other being subdomain2.example.com. I am not sure how to accomplish this though.
This is likely possible, but you’ll get better advice if you explain a little bit more about what you’re trying to do and also the why of what you’re trying to do.
You can reconfigure nginx to direct multiple subdomains to Ghost, although Ghost will want to redirect them all to its own domain. You can link to anywhere (/ghost > settings > navigation). I’m not sure if you’re picturing the subdomains as being part of Ghost, or something entirely different. Many users have the opposite question - they want multiple subdomains to look like one site…
Thanks Cathy. We have spoken in the past.
What I am trying to accomplish is have a landing page (example.com) in which one could click on either subdomains (subdomain1.example.com and subdomain2.example.com). The theme should be consistent throughout but one linked subdomain would contain work related posts while another would contain a different subject matter. A simpler solution would be to do something like example.com/work/ and then example.com/fun/ to separate the posts. But I think subdomains do a better job at keeping these two different topics separate.
I can easily setup my DNS nameservers to handle subdomains and then alter the .conf file to reconfigure the nginx server, but this would be only a type of redirect where subdomain.example.com resolves the same as example.com. For Ghost, I wouldn’t know how it could handle multiple domains as typically a site is one domain. In fact, the yaml file which handles routing assumes that Ghost is working on a single root domain.
Could I run another instance of Ghost, one with the subdomain and the other with the root domain? I’ve seen examples of this on the web, but once one clicks on the subdomain, it appears to be a different “site”. For example, see rajeshtaylor.com where clicking on a subdomain link takes you to journal.rajeshtaylor.com.
Running a second install of Ghost is probably the easiest option, particularly if you’re trying to make what’s effectively two sites (design, content, branding) anyway!