0

I have a web pages constructor.

Every user has opportunity to create web page on my resource.

There are several examples of that pages: 1 https://candylanding.netlify.app/601b1141bfa41700154f7e13 2 https://candylanding.netlify.app/6022ec4641423100151632d7

As you can see the url-addresses of these pages are ugly.

And I am sure that many users want to change it on some beautiful short name (such as DOMAIN.COM)

How can I achieve this? Please give me an idea..

using create-react-app, react-router-dom

1 Answers1

0

Domain allocation is based off of domain ownership, so unless you own DOMAIN.COM users will not be able to use it.

Cloud platform as a service (PaaS) providers like Netlify and heroku use subdomains before the domain to create a clean URL, but you will need access to your server to do this (it won't be possible on netlify)

I think a good first step is allow users to name their route:

ie:

https://candylanding.netlify.app/my-user-site

instead of

https://candylanding.netlify.app/6022ec4641423100151632d7

Once you have that running you can then have a look at this question to dynamically create subdomains:

How to let PHP to create subdomain automatically for each user?

Jesse Reza Khorasanee
  • 3,140
  • 4
  • 36
  • 53