V
V
Vlad2019-03-16 00:20:01
Domain Name System
Vlad, 2019-03-16 00:20:01

Redirect from all subdomains to the main domain - how?

Please tell me how to make it so that when I open any subdomain that does not even exist for me, a 301 redirect to the main domain occurs?

123211.site.ru
ssfesd32.site.ru

301 on site.ru

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-03-16
@Casufi

https://en.wikipedia.org/wiki/Wildcard_DNS_record
https://www.namecheap.com/support/knowledgebase/ar...
This is just the first part, with this setting your subdomains will basically be directed to your IP and further, depending on which nginx or apache server you are, google for an example redirect from www to the main domain

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question