I just bought an expired domains and there are lots of backlinks to different subdomains.
I am planning to make a new blog on the domain and I want to get all the link juice.
So I want to create a 301 redirect from subdomains (and their pages) to a page on the root: example.com/MYPAGE
How do I do that in WordPress?
Later Edit:
Someone from Namecheap support helped me, but I'm not sure if this redirect method will get the link juice (backlinks pointing to subdomain).
so what de did:
created the
sub.example.com
subdomain (where SUB get those backlinks)created redirect in cPanel from
sub.example.com
tosub.example.com/^/(.*)$
added this code in
.htaccess
uploaded onsub.example.com
RewriteEngine On RedirectMatch 301 ^/(.*)$ https://example.com/sub
Is that good enough?
The redirect it works, I have created a page on my wp blog and the traffic from subdomain goes there.
sub.example.com
tosub.example.com/^/(.*)$
"? You don't need to implement #2 when you are implementing #3. (AFAIK, redirects in cPanel simply edit your.htaccess
file for you - often incorrectly.) You should edit your question to include the additional information from your dupe question on StackOverflow.