So I recently switched to nginx but I didn't specify my site_name in nginx.conf, which I've learned is interpreted as a wildcard domain, meaning you can access the site through any subdomain. I had a subdomain DNS 'A' record set up pointing to my site's ip. Somehow google picked up on the subdomain and indexed my entire site's content through the subdomain and now my traffic plummeting. It's down from 4k uniques / day to 1.2k / day. Ouch!

I've specified my site name, and any traffic not coming through www.mydomain gets 301 redirected to www.mydomain. What else can I do to reverse this catastrophe?

I've considered conical links to my content, but I'm hesitant to introduce too many changes at once. I submitted my sitemap to google over a year ago but I haven't updated it since. I do not have a robots.txt file for the site. Is it possible to reverse the damage done?

My site has quality, unique content, and I'm not aggressive with seo, I rarely make changes and have it dialed in to correctly reflect what the site offers.

  • 3
    You are doing the right thing. HTTP 301 is just what Google recommends in these situations: en.wikipedia.org/wiki/HTTP_301
    – jap1968
    Commented Feb 16, 2013 at 19:50
  • 1
    This looks like a question for our sister site Webmasters. Commented Mar 8, 2013 at 13:46

2 Answers 2


The 301 redirect that you are doing is the correct way to recover. The canonical tag that you are considering and 301 redirects can't be used at the same time. The canonical tag is only for pages that can't be redirected.

Recovery should be in a week to a month. If it is longer than that, it is likely that something else has happened.

  • +1 But I wouldn't say that Canonical tags are for non-redirect pages only. They should be on every page where the page had a definite canonical URL.
    – Chris S
    Commented Mar 8, 2013 at 14:35
  • A redirect is not a page, as such it is not possible to put a canonical tag on a redirect. Well, technically there is a page for browsers that don't support redirects. However all browsers and crawlers now support redirects and that page is completely ignored by search engines. Commented Mar 8, 2013 at 14:47
  • I see what you're saying now, and agree. I was thinking something else.
    – Chris S
    Commented Mar 8, 2013 at 14:49

As a belated followup for anyone else experiencing this issue, it took my site about two weeks to fully recover, and there was no permanent damage done to my SEO ranking. Once the site was fully recovered I introduced conical links to all pages to help google identify out of place pages in the event of another such mishap.

  • 1
    FYI you should be able to use the same StackExchange account on both sites to add a comment to your own question. Commented Aug 26, 2015 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.