1

I have a SaaS platform where people can create their own white labeled job boards.

My main product domain is www.myproductdomain.com

When clients sign up they automatically get clientname.myproductdomain.com. They can also choose to use a custom domain by setting up a CNAME.

This means that every client by default has at least one domain, but could have two pointing to the same content if they choose to use a custom domain, i.e.:

  • clientname.myproductname.com <-- default subdomain on sign up
  • www.clientname.com <-- if they choose to setup a CNAME and have a custom domain

This essentially means there is duplicate content. In the above scenario, when Google hits the default clientname.myproductname.com domain, I do a 301 redirect to their custom domain. Does this seem problematic? Is there a better approach?

1

A redirect to the preferred or canonical name is a great solution. The term for this is URL canonicalization and it is very common practice for search engine optimization.

Instead of redirects, you could choose to use meta robots canonical tags.

You might also want to support multiple CNAMEs per client. For example, I might want to have both of these URLs working:

  • http://jobs.example.com/
  • http://www.jobs.example.com/

I would probably want to pick the one without the www as the canonical one and have the other redirect to the preferred version.

|improve this answer|||||
  • Thanks! Is it bad that the redirect from clientname.myproductname.com to www.clientname.com only happens when Google crawls? A human does not get the redirect. – cman77 Jan 5 '15 at 1:41
  • Great point on the canonical tag! I can add that if they have a custom domain.....should I kill the 301 then? I guess so if I have the canonical tag – cman77 Jan 5 '15 at 1:44
  • 1
    Redirects are generally better than the canonical tag, not all bots pay attention to tags, but they do all follow redirects. You shouldn't redirect just bots though, the canonical tag would be better in that case. Why wouldn't you want users to get the redirect as well? – Stephen Ostermiller Jan 5 '15 at 2:04
  • I need to still be able to have a user get to certain areas of clientname.myproductdomain.com (for wildcard SSL purposes). Maybe I should just remove the 301 redirects that are in place for bots only, and just rely on the canonical tags.... – cman77 Jan 7 '15 at 19:56
  • 1
    Yes, that sounds like an excellent solution. Redirecting only for bots could be considered cloaking by Google and could get your site penalized. – Stephen Ostermiller Jan 7 '15 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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