Wildcard Redirects for SEO Value in Siteground Site Tools

Phil Hudson SEO Leave a Comment

This morning I was swapping a domain name in Search Console and needed to create a wildcard redirect (redirecting all subpages within a domain to their corresponding page on the new domain name ie. olddomain.com/page to newdomain.com/page). Siteground has recently been moving people from Cpanel to their own Site Tools which is simple enough to use but strips away a lot of the functionality that was developed in Cpanel over the last several decades. One of those features, it turns out, is the ability to do a wildcard redirect.

I dug around for about an hour and couldn’t find out how to do this so I spoke to support (one of the reasons I love Siteground is how quickly they respond and how knowledgeable their support staff actually are). They confirmed that there is no way to do a wildcard redirect for SEO in Siteground Site Tools and you have to manually configure this in your .htaccess file.

Because this isn’t documented anywhere, I decided to put the steps up myself to make this easier for anyone else looking for this vital step to preserve SEO authority on the individual page level and not just the domain level.

So, here’s the quick and dirty:

  1. Login to Siteground and navigate to the Site Tools for your domain.
  2. Click on Domains and hit Parked Domains.
  3. Add your New Domain to the Parked Domains list.
  4. Navigate to your domain registrar and update your A record or Name Servers (make sure you preserve any cnames for subdomains or MX records for email and move them over to Site Ground under the DNS Settings tab right there under Domains.
  5. Go to your Files, and find your .htaccess file (you might need to check the box that allows you to see hidden files in order to find it).
  6. Add the following code to your .htaccess file and make sure you replace the domains with your old and new domain.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC] RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301,NC]

Give it about 30 minutes or check https://dnschecker.org to make sure your DNS has propagated, then using an incognito browser try going to a subpage in the old domain and see if it redirects. If it works, you should be good to finish your domain update in Google Search Console.

Good luck!