2

hreflang 'no return tags' error, caused because the empty slash '/' url links to a page that links back to '/index.php'. Shouldn't Google Webmaster Tools be smart enough to recognize that this is a valid return tag? Must i do something to correct a Google boof?

1
  • / doesn't link back to your index.php it links to / and from there its redirected to index.php. Google is having to go to one URL and then another which is incorrect for hreflang as it should be the actual URL and not a redirect URL. The solution to your issue is pretty obvious use /index.php as the href or make your site work without having to have index.php in the URL all together. Feb 18, 2016 at 20:42

2 Answers 2

1

/ means your root directory. It is totally normal to return index.php.

To avoid it, you need to use an .htaccess rule rewrite to get / into example.com instead of example.com/index.php.

It's also good to use the rewrite rule to hide the extensions on the URL index instead of index.php.

1
  • "to avoid it you need to use .htaccess" - to avoid it you need to correct the links on the page.
    – MrWhite
    Feb 19, 2016 at 10:38
1

Since these are php scripts, i solved the issue by recognizing within the script whether '/' or '/index.php' is being called, and modify the hreflang link accordingly.

1
  • It is best practice to never use index.php in URLs. You should only ever link to URLs that don't have that. If you have used it in the past (as it seems you have done), it is best to fix all your links and redirect away from it. Feb 22, 2016 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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