Do you want to recover lost link juice from deleted subdomains? Many times we create subdomains to publish related content and over time many of us have had to delete content on those sub-domains all together in view of various Google penalties like Google Panda or Google penguin and sometimes because we lose interest on the topic and no longer wish to develop it further.
404 Broken Backlinks on Subdomains!
However, when we publish any content online and share it across social media it attracts likes shares and backlinks. if you go ahead and try to check the backlink profile of the subdomains you will realize there might be a lot of backlinks coming from high domain authority websites!
For example, we used to run a jobs subdomain on this site where we ran a job board to post jobs. However, this was very thin content and didn’t attract much traffic or jobs. Therefore long time back we deleted the subdomain for a cleaner site structure.
However, after shifting to A2 Hosting, I decided to do a link audit and test the subdomains backlink profiles also. I realized that many of these deleted subdomains had significant backlinks coming from high domain authority websites
So we decided to reclaim lost link juice which was gone for free.
Create Subdomain
So first we added subdomains back to the domain from the hosting cPanel.
301 Redirect Subdomain with cPanel
Now you can set up subdomain redirect from CPanel itself in one click or set up custom redirects from .htaccess.
Using the cPanel file manager (or any FTP client) we went into the folder of the subdomain and added .htaccess redirect codes to 301 redirect all the links from these subdomains to the root domain page (or in your case to any other subdirectory your page which you like).
301 Redirect Subdomain with .htaccess
This the .htaccess code which you can add to this file in case you want to redirect to the root. These have to be added to the subdomain folder and not domain root.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.yoursite.com$
RewriteRule ^(.*)$ https://yoursite.com/ [R=301,L]
Here is the .htaccess code which will redirect all URLs to the same URL structure on your domain.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.yoursite.com$
RewriteRule ^(.*)$ [R=301,L]
Once you have done that and all the redirects are in place you can easily check that all the backlinks from the backlink profile are working or not.
Therefore you just reclaimed hundreds of 404 broken links by creating effective 301 redirects from the subdomain to your main domain and recovered lost link juice easily in a few minutes. So do go ahead and check the link profile of your deleted subdomains as it is equally important to check and get some SEO benefit for higher search engine traffic.