Sorry for the confusion, I'll address your questions:
I have a main website that let's users have their own custom.mainsite.com. Along with that, their pages are at custom.mainsite.com/blog or anything else after the '/'
I need an added feature that lets a user register their own domain(any registrar.. doesn't matter), point the nameservers to my server(I would give directions on how they can do that), and then I take the 3rd step and make it so that when someone visits theirdomain.com, it shows the content of custom.mainsite.com, but without changing the address bar. Similarly,I want any other pages like theirdomain.com/blog to show the content of custom.mainsite.com/blog.
Wordpress and wix(and many others) do this, but I don't know WP(and obviously can't see how wix codes their custom domains) so I just don't know the best way to accomplish this. I have a working way, which I posted above, but since I'm new to this process, I may be making it way harder on myself or the server with the method I used.