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?