A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

1

The solution you are looking for is using a canonical tag to signal Google which of the pages you want INDEXED and shown on Google. A canonical tag transfers the "SEO" value of a URL to a different one but it keeps both online and accessible; a redirect (such as a 301) replaces one with the other. What you want is to add a canonical tag in the example.com/...


2

HTTP redirects happen AFTER the TLS handshake. For the TLS handshake to be successful, the server has to present a valid certificate, having in it the hostname that is in the URL being accessed, otherwise browsers will show errors. So the rule is simple: as soon as you see an https:// URL, even if all accesses to it are finally redirected to another URL, ...


3

Your indexing is going to be spotty. Google may index some of both sites. It will index mostly your international site because Google does most of its crawling from the US. Auto-redirection based on geo-IP address or the Accept-Language header hurts SEO. If you want good SEO, you can't use redirects. Google crawls from all over the world. It expects to ...


0

It's not certain that Google would index the redirect, it would depend a lot on the canonical URL that is set up on both pages. In your scenario, this is a single site with a folder holding the International variation of product pages existing on the site. You're going to want to provide a canonical on both of the pages specifying which URL the crawler ...


1

This is a WordPress site and I'm using the Redirection plugin by John Godley. There is an example on the Plugin's "Redirect Regular Expressions" page that appears to do exactly what you need. For example, your "source URL" would be: /listing/old-district/(.*) and corresponding "Target URL" would be: /new-district/$1 The pattern (.*) captures anything (...


2

You have a misconception about what DNS can do. You say, "I know I can redirect all subdomains ... using a wildcard DNS record." However, DNS can't do redirects at all. All DNS can do is point your domain (or subdomains) to the IP address of a server. Even if you use a CNAME record, DNS doesn't redirect. A CNAME just means that the domain resolves to ...


0

I think you are asking the wrong question and a redirect isn't the correct solution in your case. It might be better to use Dynamic Rendering for your use case in which something like a dashboard that is dynamically generated is rendered statically for the user-agent of googlebot and others bots of their ilk. Basically, serve the public, non-specific ...


1

As has already been stated, treating Googlebot differently to normal users and redirecting Googlebot only is generally not a good idea. An alternative approach is to: Redirect all users/bots from /app to /dashboard (the new "app") But include a link back to the old "app" from /dashboard that is not redirected. eg. /app?noredirect=1 that allows users to ...


-1

You just need to redirect googlebot PHP for exp if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "googlebot")) { // redirect } For nginx exp if ($http_user_agent ~ (googlebot) ) { return otherdomaine.com; }


0

The simplest way to do this is to check the request user agent and redirect based on that. Google have list of user agent strings that used for each type of request. You can check if the user agent is matching "Googlebot" then redirect. If you are using Nginx as your web server you can do something like this. if ($http_user_agent = "Googlebot") { ...


Top 50 recent answers are included