Site map url with protocol (https)

9 views
Skip to first unread message

Rajkumar Ulaganadhan

unread,
May 23, 2016, 4:31:40 AM5/23/16
to Ruby on Rails: Talk
Hi All,

I have used dynamic_sitemaps for sitemap.


Command to generate xml file "rake sitemap:generate"

After running this command it is generating this xml files

<sitemapindex><sitemap>
<loc>
</sitemap>
</sitemapindex>

My Expectation:

Here i need the protocol as "https" instead of http



How to override the default protocol in sitemap.



Please give me suggestions

Thanks in advance.

Rob Biedenharn

unread,
May 23, 2016, 11:44:12 AM5/23/16
to rubyonra...@googlegroups.com
A quick look at https://github.com/lassebunk/dynamic_sitemaps/blob/master/lib/dynamic_sitemaps/sitemap.rb and https://github.com/lassebunk/dynamic_sitemaps/blob/master/lib/dynamic_sitemaps.rb seems to indicate that this is supported in the config file (config/sitemap.rb by default) as:

  protocol "https"

It doesn't get much simpler than that. 

(I've never used this gem, but if you read a lot of Ruby source, these things start to become more apparent.)

-Rob
Reply all
Reply to author
Forward
0 new messages