Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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., example.com 301 redirected to www.example.com. (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 a.b.com, b.b.com, c.b.com... In the current configuration, I do have something like this *.a.com *.b.com *.c.com *.d.com. 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
add comment

Your Answer

 
discard

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.