I purchased a website with hundreds of subdomains which i would like to redirect to a root domain.
blabla1.domain.com 123something.domain.com 123abc.domain.com etc...
I want this all redirect to domain.com
What is an easiest way to do this?
may be try
server_name *.domain.com; return 301 http://domain.com$request_uri;
I would use Cloudflare and create ONE pagerule to forward from:
*.domain.com/*
To:
https://domain.com/$2
This would simplify the SSL management a lot, since you wouldn't have to deal with wildcards.
See this thread also https://community.wordops.net/d/736-redirect-all-subdomains-to-main-blog
Hosted by VirtuBox