How to build sitemap.xml for AngularJS website?
I have setup an AngularJS application which is using ui-state router. It has some static pages and other than that it has profile pages which generate dynamic page based on profile id.
For SEO purpose I have used PhantomJS and generate HTMLs to give crawler response.
But, How can I generate sitemap.xml which contains all the dynamic pages URL and by that crawler can fetch and list on search engine?
angularjs xml seo phantomjs sitemap.xml
add a comment |
I have setup an AngularJS application which is using ui-state router. It has some static pages and other than that it has profile pages which generate dynamic page based on profile id.
For SEO purpose I have used PhantomJS and generate HTMLs to give crawler response.
But, How can I generate sitemap.xml which contains all the dynamic pages URL and by that crawler can fetch and list on search engine?
angularjs xml seo phantomjs sitemap.xml
add a comment |
I have setup an AngularJS application which is using ui-state router. It has some static pages and other than that it has profile pages which generate dynamic page based on profile id.
For SEO purpose I have used PhantomJS and generate HTMLs to give crawler response.
But, How can I generate sitemap.xml which contains all the dynamic pages URL and by that crawler can fetch and list on search engine?
angularjs xml seo phantomjs sitemap.xml
I have setup an AngularJS application which is using ui-state router. It has some static pages and other than that it has profile pages which generate dynamic page based on profile id.
For SEO purpose I have used PhantomJS and generate HTMLs to give crawler response.
But, How can I generate sitemap.xml which contains all the dynamic pages URL and by that crawler can fetch and list on search engine?
angularjs xml seo phantomjs sitemap.xml
angularjs xml seo phantomjs sitemap.xml
asked Nov 14 '16 at 14:42
Mayur ChampaneriaMayur Champaneria
124113
124113
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Using JavaScript
You can use XMLWriter to create an XML. Then you can pass this XML as a string to your web server. Check this out for XML Writer.
Here is a tutorial for the available methods for writing an XML using XMLWriter - Tutorial
Using Nodejs
You can write a node js function for generating the sitemap from the generated URLs. Please refer to this link for a sample.
The better way is to create a script in the backend to generate it periodically to update sitemaps. Query the tables, create URLs and generate XML files. You can configure cron jobs in the server to generate the sitemaps periodically.
There will be libraries and tutorials available for each BE technology for generating the sitemap.
For example:
Ruby on Rails - Nokogiri
Elixir - sitemap
.Net - Tutorial
Java - Tutorial
Express JS - express-sitemap
add a comment |
Simple, You need to generate online Sitemap that creates all dynamic URLs.
Just Search Online Sitemap Generator. put your Website URL and it creates the Sitemap.XML file, You need to download that file and upload in your server.
after that check that Sitemap using www.mydomain.com/sitemap.xml
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40591362%2fhow-to-build-sitemap-xml-for-angularjs-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using JavaScript
You can use XMLWriter to create an XML. Then you can pass this XML as a string to your web server. Check this out for XML Writer.
Here is a tutorial for the available methods for writing an XML using XMLWriter - Tutorial
Using Nodejs
You can write a node js function for generating the sitemap from the generated URLs. Please refer to this link for a sample.
The better way is to create a script in the backend to generate it periodically to update sitemaps. Query the tables, create URLs and generate XML files. You can configure cron jobs in the server to generate the sitemaps periodically.
There will be libraries and tutorials available for each BE technology for generating the sitemap.
For example:
Ruby on Rails - Nokogiri
Elixir - sitemap
.Net - Tutorial
Java - Tutorial
Express JS - express-sitemap
add a comment |
Using JavaScript
You can use XMLWriter to create an XML. Then you can pass this XML as a string to your web server. Check this out for XML Writer.
Here is a tutorial for the available methods for writing an XML using XMLWriter - Tutorial
Using Nodejs
You can write a node js function for generating the sitemap from the generated URLs. Please refer to this link for a sample.
The better way is to create a script in the backend to generate it periodically to update sitemaps. Query the tables, create URLs and generate XML files. You can configure cron jobs in the server to generate the sitemaps periodically.
There will be libraries and tutorials available for each BE technology for generating the sitemap.
For example:
Ruby on Rails - Nokogiri
Elixir - sitemap
.Net - Tutorial
Java - Tutorial
Express JS - express-sitemap
add a comment |
Using JavaScript
You can use XMLWriter to create an XML. Then you can pass this XML as a string to your web server. Check this out for XML Writer.
Here is a tutorial for the available methods for writing an XML using XMLWriter - Tutorial
Using Nodejs
You can write a node js function for generating the sitemap from the generated URLs. Please refer to this link for a sample.
The better way is to create a script in the backend to generate it periodically to update sitemaps. Query the tables, create URLs and generate XML files. You can configure cron jobs in the server to generate the sitemaps periodically.
There will be libraries and tutorials available for each BE technology for generating the sitemap.
For example:
Ruby on Rails - Nokogiri
Elixir - sitemap
.Net - Tutorial
Java - Tutorial
Express JS - express-sitemap
Using JavaScript
You can use XMLWriter to create an XML. Then you can pass this XML as a string to your web server. Check this out for XML Writer.
Here is a tutorial for the available methods for writing an XML using XMLWriter - Tutorial
Using Nodejs
You can write a node js function for generating the sitemap from the generated URLs. Please refer to this link for a sample.
The better way is to create a script in the backend to generate it periodically to update sitemaps. Query the tables, create URLs and generate XML files. You can configure cron jobs in the server to generate the sitemaps periodically.
There will be libraries and tutorials available for each BE technology for generating the sitemap.
For example:
Ruby on Rails - Nokogiri
Elixir - sitemap
.Net - Tutorial
Java - Tutorial
Express JS - express-sitemap
answered Nov 27 '18 at 6:12
Tessy ThomasTessy Thomas
1,112716
1,112716
add a comment |
add a comment |
Simple, You need to generate online Sitemap that creates all dynamic URLs.
Just Search Online Sitemap Generator. put your Website URL and it creates the Sitemap.XML file, You need to download that file and upload in your server.
after that check that Sitemap using www.mydomain.com/sitemap.xml
add a comment |
Simple, You need to generate online Sitemap that creates all dynamic URLs.
Just Search Online Sitemap Generator. put your Website URL and it creates the Sitemap.XML file, You need to download that file and upload in your server.
after that check that Sitemap using www.mydomain.com/sitemap.xml
add a comment |
Simple, You need to generate online Sitemap that creates all dynamic URLs.
Just Search Online Sitemap Generator. put your Website URL and it creates the Sitemap.XML file, You need to download that file and upload in your server.
after that check that Sitemap using www.mydomain.com/sitemap.xml
Simple, You need to generate online Sitemap that creates all dynamic URLs.
Just Search Online Sitemap Generator. put your Website URL and it creates the Sitemap.XML file, You need to download that file and upload in your server.
after that check that Sitemap using www.mydomain.com/sitemap.xml
answered Nov 27 '18 at 9:52
Bhagirath SindhavBhagirath Sindhav
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40591362%2fhow-to-build-sitemap-xml-for-angularjs-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown