How can I add sitemap.xml to angularJS site?

落花浮王杯 提交于 2019-12-08 17:00:23

问题


I added sitemap.xml in app folder but how can I make it public so that the google webmaster tool can get it?

Thanks


回答1:


From Google's Build and Submit a Sitemap Documentation:

There are two different ways to make your sitemap available to Google:

Submit it to Google using the Search Console Sitemaps tool

OR

Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap: Sitemap: http://example.com/sitemap_location.xml




回答2:


you can make it visible by storing it outside of your angular application. so simply put it into your main directory and link to it in webmaster tools: http://yourDomain.com/sitemap.xml

the yearofmoo article is helpful but in the end they also recommend using a sitemap along with their technique. In your sitemap you should use full url paths to access a state.




回答3:


Try To Put the Sitemap.xml in the Root directory of your website or WebApp. just like http://example.com/sitemap.xml . In your case Disable the Angular.js Routing




回答4:


Put your sitemap.xml file in the public folder.




回答5:


First, you need to generate sitemap online and download that Sitemap.XML file and give your developer. The developer set priority according to your website page and according to priority your sitemap URL crawl by Google Bot.



来源:https://stackoverflow.com/questions/20523274/how-can-i-add-sitemap-xml-to-angularjs-site

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!