How to make nginx to redirect multiple subdomains?

How do I make Google/et al spider a website as its primary URL, instead of its redirected subdomain?

  • We have multiple subdomains - each unique - and each with their own domain names (that just redirect to the subdomain) ... Is there a way to make search engine spiders look at the sites as their branded domain, instead of the redirected subdomain?

  • Answer:

    Let me get this straight. You have several domain names. Each domain name redirects to a subdomain on a different domain. You want Google to crawl them as their domain name and not their subdomain? So you have http://abc.com, http://123.com and http://xyz.com. You redirect them to http://abc.mydomain.com, http://123.mydomain.com and http://xyz.mydomain.com. You want Google to crawl them as http://abc.com, http://123.com and http://xyz.com? If that is correct, what you want is impossible. If you 301 redirect something to somewhere else, Google crawls the somewhere else because that's what the 301 redirect code tells it to do. Unless I am misunderstanding the question, what you want isn't possible with search engines.

Dan Deceuster at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.