DEV Community

Discussion on: How does one go about allowing custom domains to point to your application?

Collapse
 
joshualjohnson profile image
Joshua Johnson

How you really want to handle it, is for each client, setup a different instance of the application. You can handle this in multiple ways. VirtualHosts are typically how we assign custom domains to their perspective instance.

1) Point the A Record of the domain to the IP of the server you intend to serve the application from.
2) Configure the server to accept the domain and serve your application.

I need to know more about the problem you are trying to solve before I can give you a solid solution for how you might host the application/server configuration. I could jump on a call and give you some direction once I hear more about what you are trying to accomplish.

Thread Thread
 
michael profile image
Michael Lee 🍕

I've add more details of what I'm trying to achieve on this comment.

Basically for folks to set up a profile, then at some point if they want, they can point a custom domain to said profile and it would show their profile on the application when folks hit their custom domain.

Thread Thread
 
joshualjohnson profile image
Joshua Johnson

Like a blog platform would does this type of thing?

In that case, I would say that you can host within a single application. However, at the server level is where you would configure your VirtualHosts so that you can serve the application with different domains. At the application level, you will want a way to associate the custom domain with the client profile.

Thread Thread
 
michael profile image
Michael Lee 🍕

Yeah, I think the easiest comparison to the idea is a blog platform. Where a user can create content and "publish" it to the account on the platform I'm creating and then point their custom domain to it.

Thanks Joshua for the guidance! Think you've set me on a good path :)

Thread Thread
 
joshualjohnson profile image
Joshua Johnson

No problem! Glad to help!