Ajenti
Knowledge base
EN
English (EN)
Русский (RU)
Español (ES)
Français (FR)
Deutsch (DE)
Nederlands (NL)
Íslenska (IS)
Eesti (ET)
Қазақша (KK)
Українська (UK)
Dansk (DA)
Català (CA)
Polski (PL)
Sign in / Sign up
EN
English (EN)
Русский (RU)
Español (ES)
Français (FR)
Deutsch (DE)
Nederlands (NL)
Íslenska (IS)
Eesti (ET)
Қазақша (KK)
Українська (UK)
Dansk (DA)
Català (CA)
Polski (PL)
Sign in / Sign up
General
Questions
0
Is it?
Inappropriate
Spam
Duplicate
Redirect subdomains to main domain
MonsterCake
9 years ago
•
updated by
janxb
9 years ago
•
3
Is there a simple way to redirect all subdomains *.domain.com to domain.com?
Vote
0
0
Undo
Follow
Replies
3
Oldest first
Newest first
Oldest first
0
Lexy
9 years ago
in the nginx configuration of your site >> content tab >> custom confiquration
enter youre server_name like this
server_name yourdomain.com *.yourdomain.com;
Reply
Is it?
Inappropriate
Spam
Duplicate
|
0
Roman Random
9 years ago
I tried this solution but it doesn't work for me. Also tried this to no avail:
server {
server_name *.mydomain.com;
rewrite ^(.*)
http://
mydomain.com$1 permanent;
}
Please, give me some hint!
Reply
Is it?
Inappropriate
Spam
Duplicate
|
0
janxb
9 years ago
Please have a look at the answer
I posted in this thread
.
Edit: You then would add a nginx redirect in the created default host to redirect to the main domain.
Reply
Is it?
Inappropriate
Spam
Duplicate
|
Customer support service
by UserEcho
Share
Topic stats
0
Votes
3
Replies
3
Followers
8,097
Views
enter youre server_name like this
server_name yourdomain.com *.yourdomain.com;
server {
Edit: You then would add a nginx redirect in the created default host to redirect to the main domain.