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?

  • / 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. – Simon Hayter Feb 18 '16 at 20:42
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.

  • "to avoid it you need to use .htaccess" - to avoid it you need to correct the links on the page. – MrWhite Feb 19 '16 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.

  • 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. – Stephen Ostermiller Feb 22 '16 at 18:15

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.