Skip to main content
code format example URL, capitalization
Source Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

By putting a redirect you are telling Google and any other search engine that the page you want to show is the second one (the target of your redirect).

Consider this example:

It wouldn't make sense to show in the SERPSSERPs the first one, as it's obsolete. The correct way is to show the second page, where the user redirects.

In addition, the canonical tag you've implemented is causing a redirect loop. However, Google is smart enough to handle it correctly.

To get the results you want, you can either:

  1. Redirect from https://www.example.com/en/index.phphttps://www.example.com/en/index.php to https://www.example.com/https://www.example.com/ and serve your homepage on that URL (which is the default).
  2. If your objective is to serve different languages, implement a form of automatic redirection based on the browser language (however, you'll still need to have some content on https://www.example.com/https://www.example.com/ if you want it to be indexed).

By putting a redirect you are telling Google and any other search engine that the page you want to show is the second one (the target of your redirect).

Consider this example:

It wouldn't make sense to show in the SERPS the first one, as it's obsolete. The correct way is to show the second page, where the user redirects.

In addition, the canonical tag you've implemented is causing a redirect loop. However, Google is smart enough to handle it correctly.

To get the results you want, you can either:

  1. Redirect from https://www.example.com/en/index.php to https://www.example.com/ and serve your homepage on that URL (which is the default).
  2. If your objective is to serve different languages, implement a form of automatic redirection based on the browser language (however, you'll still need to have some content on https://www.example.com/ if you want it to be indexed).

By putting a redirect you are telling Google and any other search engine that the page you want to show is the second one (the target of your redirect).

Consider this example:

  • Original page: https://www.example.com/this-content-is-obsolete
  • Redirects to: https://www.example.com/this-content-is-current

It wouldn't make sense to show in the SERPs the first one, as it's obsolete. The correct way is to show the second page, where the user redirects.

In addition, the canonical tag you've implemented is causing a redirect loop. However, Google is smart enough to handle it correctly.

To get the results you want, you can either:

  1. Redirect from https://www.example.com/en/index.php to https://www.example.com/ and serve your homepage on that URL (which is the default).
  2. If your objective is to serve different languages, implement a form of automatic redirection based on the browser language (however, you'll still need to have some content on https://www.example.com/ if you want it to be indexed).
Source Link

By putting a redirect you are telling Google and any other search engine that the page you want to show is the second one (the target of your redirect).

Consider this example:

It wouldn't make sense to show in the SERPS the first one, as it's obsolete. The correct way is to show the second page, where the user redirects.

In addition, the canonical tag you've implemented is causing a redirect loop. However, Google is smart enough to handle it correctly.

To get the results you want, you can either:

  1. Redirect from https://www.example.com/en/index.php to https://www.example.com/ and serve your homepage on that URL (which is the default).
  2. If your objective is to serve different languages, implement a form of automatic redirection based on the browser language (however, you'll still need to have some content on https://www.example.com/ if you want it to be indexed).