dongzhi4239 2019-02-21 18:56
浏览 112
已采纳

谷歌如何知道我的网页链接,因为我想创建一个多语言的网站,但SEO阻碍了我的方式

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

https://imgbbb.com/image/RgT9r

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

</div>
  • 写回答

2条回答 默认 最新

  • duanbu1421 2019-02-22 17:43
    关注

    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 Codes hreflang 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" href="https://example.com/en/" />
    <link rel="alternate" hreflang="ja" href="https://example.com/ja/" />
    

    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).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度