Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem is that we apparently don't receive any tracking of google analytics. We have X domain for that particular site. Google analytics only appear to support one domain unless you setup links and forms which isn't really a great idea.

I believe it will be better to have only one working domain and all other domains will work as redirects. In other word, I can setup my NGinx server to redirect all satelites domain to the main domain... or edit directly the dns to redirect to the main domain.

I'd like to know which way of doing redirect is the best and how exactly. I guess I should return a 301 message error.

On the other hand, if there is a way to handle simply google analytics with all the domains it would be also great.

share|improve this question

Not sure about your exact situation, but for SEO reasons 301 redirect is best for satellite domains to point to main domain(we do at the DNS level).

e.g., 301 redirected to (This is what we do for our domains)

As far as google analytics go, you have to choose multiple domains in google analytics settings if you want to track all satellite domains.

(Admin> Tracking code> One domain with multiple subdomains)

share|improve this answer
As far as I can tell. One domain with multiple subdomains is equal to,, In the current configuration, I do have something like this * * * * I'm more in "Multiple domains with multiple subdomains" – Loïc Faure-Lacroix Apr 29 '12 at 22:35
One suggestion: With the new real time beta in analytics, you can play with tracking code on certain pages on subdomains and see if it shows up in analytics while testing in real time. – Raj J Apr 29 '12 at 23:10
i guess it's something I can do. I didn't know about it – Loïc Faure-Lacroix Apr 29 '12 at 23:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.