0

I have a created a application where everyone can have their own stores and its hosted on netforcelab.com e.g india.netforcelab.com its exactly a not subdomain but a programming url.

Now i want to add a feature where customers can choose their domain name e.g if they choose naveenmarketing.com then when we open naveenmarketing.com it should load contents from india.netforcelab.com

Hows its possible? what are the things needs to done on our end or customer end?

Naveen
  • 35
  • 2

1 Answers1

1

i don't know the details about your web platform, so i'll give you just general platform independent advices:

  • custom domain must be registered on a dns server and point to your app server: you can use an A record pointing to india.netforcelab.com ip address or a CNAME record pointing to india.netforcelab.com
  • your web server/load balancer must be configured to accept requests for those custom domains ( i.e. if you use an apache2 server you need a virtual host handling naveenmarketing.com as a server alias of india.netforcelab.com )
  • your web application have to be aware about the url from which is being accessed so it can render the appropriate urls in rendered pages, avoiding having the user bouncing from pages in form of naveenmarketing.com/ to others in form of india.netforcelab.com. this can be achieved using env variables exported by apache or by the webserver you are using.
Valerio Minetti
  • 343
  • 2
  • 7
  • i am using php/apache shared server right now. But i am not even sure its possible in shared server? Its coded on codeigniter php framework – Naveen Jun 22 '17 at 12:54
  • depends on your hosting service. if you have a dedicated IP the answer is yes, otherwhise you should ask your support. php-wise there is no problem since apache forwards to php all the required data regarding original url and path requested by users. – Valerio Minetti Jun 22 '17 at 13:16
  • what exactly is the location of virtual host? where i have to create that? – Naveen Jun 23 '17 at 06:00