re: Should I host two websites on a single domain? VIEW POST


sub domain

You can use a sub domain to redirect mobile users to m.domain.com and keep the domain.com for web users.

This is something that is done on facebook for instance as the mobile app is much lighter than the browser.


Depending what you are using you can have a middleware that will point oto the proper place.

for instance this can be done easily on express where you would get the files from different folders but they would be served on domain.com



Thank you Mederic.

The implementation itself is not an issue as we have separate servers and a load balancer will handle the redirection (whether to a separate subdomain or same).

My question is more, which would you choose and why? Why subdomain? Why same domain? Does it make a difference?

code of conduct - report abuse