2

I want to enable my site users to use custom domain for their profiles. For e.g. the user can be found on this address: https://example.org/u/user and the user can link his domain to it, so his domain https://user.org would show the content of https://example.org/u/user.

I figured out that this can be done with a CNAME record. But when I try this, create a free domain (.TK, .ML, etc.), set it up on CloudFlare and add a CNAME record, pointing to my site (https://example.org) (the index page would get the domain that displays it's content, searches for it in the database and gets the user that has linked this domain to his profile and than display his profile), it just redirects me to this link: http://user.org/cgi-sys/defaultwebpage.cgi.

Do I have to set something up in the hosting to get this work? Or am I wrong?

  • @IdontDownVote no I don't want a subdomain, I already have that. – Péter Pán Aug 21 '18 at 22:12
  • As I said, users are able to add their own domain. It's an automatic process. The user pays for the domain, sets it up in cloudflare and points the content of the CNAME record to my site – Péter Pán Aug 21 '18 at 22:14
  • 1
    *figured out that this can be done with a CNAME record.* not alone no. As with everything in the DNS it will allow resolution of the name (not the URL) to your website. What happens next, regarding redirections and such, taking into account the path (which the DNS does not take into account since it deals only with hostname) depends only on the webserver, and its configuration. So you have two things to change: DNS and webserver configuration. – Patrick Mevzek Aug 21 '18 at 22:16
  • And what do I have to configure in the webserver? – Péter Pán Aug 21 '18 at 22:18

0 Answers0