Answer the question
In order to leave comments, you need to log in
How are links like “username.site.com/” generated?
Good evening ! How are links like username.site.com generated ?
For example on blogspot'e sab-ras.blogspot.ru
Answer the question
In order to leave comments, you need to log in
@Bowen what does the engine have to do with it? The author is probably interested in how it happens inside the engine.
In general, he probably wanted to google something like https://www.google.com/search?q=php+create+subdomain or https://www.google.com/search?q=php+create+subdoma. .. but accidentally asked a question on a toaster.
A record of the form
* IN CNAME domain.com is created in DNS.
(all subdomains = alias to the main one).
In the site code, the domain is used as a variable, with which they go to the database and show the desired "site". How exactly the variable is used there - everything is already in your hands)
What's with the subdomains. This is configured by routing.
I think a person is interested in how it is on sites when you register.
Then when you enter your personal account you get: subotinn.example.com
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question