Multi-language site, landing page
.htaccess files are extremely useful in many cases for users who either do not have root permissions or for users who simply aren't comfortable in making changes in their web server's configuration file. Trying to debug .htaccess not working isn't always the easiest thing to do, however, hopefully by checking the discuss below mentioned about seo, htaccess, redirects, multilingual, .htaccess common problems as well as the troubleshooting tips, you'll have a better grasp on what you may have to modify to get your .htaccess file running smoothly.Problem :Couldn't find a similar question here, and seems kinda simple, so sorry if this has been asked before.
I'm developing a site with dual language, setup in the following format:
http://www.example.com/en/ ~ English Site
http://www.example.com/pl/ ~ Polish Site
Assuming the client would eventually like to share the site url as...
http://www.example.com/
... without addition language sub-directory, I will implement a .htaccess redirect, probably based on UA language.
Question: Will this affect SEO at all? Are there any 'best practices' here?
In each language-specific page, ensure you have the language set. Either use the <meta http-equiv="content-language" content="ll-cc"> tag in the section of your page, where "ll-cc" stands for the culture code of the language and country/region the content applies to, or use the lang="ll-cc" attribute on either the <html> or the <title> tag like <html lang="en-gb">. Then use hreflang tags to point back to the version in the alternate language.
For the landing page you should use an "x-default" to indicate it as a language/country selector or auto-redirecting homepage. So, you may end up with something like:
Default Homepage:
<html lang="x-default">
<link rel="alternate" href="https://www.example.com/en/" hreflang="en">
<link rel="alternate" href="https://www.example.com/pl/" hreflang="pl">
English Homepage:
<html lang="en">
<link rel="alternate" href="https://www.example.com/pl/" hreflang="pl">
<link rel="alternate" href="https://www.example.com/" hreflang="x-default">
Polish Homepage:
<html lang="pl">
<link rel="alternate" href="https://www.example.com/en/" hreflang="en">
<link rel="alternate" href="https://www.example.com/" hreflang="x-default">
Comments
Post a Comment