How Google Knows The Links To My Web Pages Because I Want To Create A Multi-language Site But The SEO Stands In My Way

- 1 answer

I'm bad at English forgive me and try to understand me

** I try Multi-language ** with a database (mysqli)

** But I'm having trouble with SEO ** I created a table in such database

And I have programmed the class to select the language automatically and change the language and so on

my question is which language Google will use (when user search for any thing)

An example in register page i will put multi language button

<button><?php Lang::main('RGISTER') ?></button>

How can I put the registration page in the robots file (sitemap) in two languages, namely Arabic and English



A few essential items to ensure you've addressed when supporting internationalization of a website:

  • Set the HTML lang attribute, declaring the on-page content's language (<html lang="ja">...</html>)
  • Add link elements in the <head> with absolute URLs of the alternate versions/translations and ISO 639-1 Language Codeshreflang attribute. Important to also add a self-referencing element for the current page, itself.

Example: Current webpage is in English, yet also have Japanese-translated version of that webpage - declare <html lang="en">...</html> and within <head> add:

<link rel="alternate" hreflang="en" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="" />
<link rel="alternate" hreflang="ja" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="" />

Also add language/locale versions/references in the sitemap.xml file(s) of your website and it's always a good idea to set absolute canonical on each page.

Also have consistency, site-wide, in either ccTLD, subdirectory/subfolder, subdomain, etc.

More reading from Google Search Console support (covers sitemap support).