Adding cname names for folders

I need to achieve following via cost effective was as possible , without revealing my IP, thanks.

I am giving my services to my users via and there are pages like 


I want to allow users to allow their domains to point to this subdomain.

so they can choose between any of the 1 option below : -> -> ->

and pages should work automatically like> -> ->

Also, I use Elastic beanstalk in amazon to deploy my react application with nginx (docker image ). Before I start I want to know if this is possible.I also don’t want to give fixed ip address to my clients, just in case if I lose that IP.

I learned that we can do this by custom hostname for SAAS in Cloudflare , apex a

but can anyone explain how to do this ->

You could set up a Page Rule to perform a redirect.

i can do that if that is my domain , how does my client does it ? when his apex is pointed to some other IP and some other dns provider ? and make his folder point to my default origin server (

Can some one explain in my client point of view.