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

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程