Giter Site home page Giter Site logo

Comments (9)

kjvarga avatar kjvarga commented on July 16, 2024

Can you paste in your sitemap config? And what version of sitemap generator are you running?

I can't think of any reason why your default_host would be ignored...

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

The only way I can think of is if you are passing in full URLs to the add() method e.g.

add root_url

When it should be: add root_path.

from sitemap_generator.

antani avatar antani commented on July 16, 2024

I am not adding anything in the "create"

from sitemap_generator.

antani avatar antani commented on July 16, 2024

Sorry, I have the following entry in the "create" node.

SitemapGenerator::Sitemap.default_host = "http://cheapr.me"
SitemapGenerator::Sitemap.create do
add "/view"
end

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

Your config looks good. When I run it in a test Rails app it generates URLs with the correct hostname.

The sitemap you link to doesn't look like it matches the one you are generating. I would suggest deleting the sitemaps in public/ and then running your sitemap gen again.

Finally to be absolutely sure that you are seeing the correct sitemaps, you can call add like so:
add '/view', :host => 'http://anotherhost.com'

This forces the host for that URL. If you don't see anotherhost.com then you're not seeing the right sitemaps.

from sitemap_generator.

antani avatar antani commented on July 16, 2024

I removed the earlier sitemap files, modified the "add" line with
add '/view', :host =>"http://cheapr.me"
and regenerated the sitemaps. Now, there are two files generated (no sitemap.xml is generated)
sitemap1.xml.gz
sitemap_index.xml.gz
When I try to check http://cheapr.me/sitemap.xml I see 404

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

The sitemaps are compressed using GZip. You can uncompress them using WinZip, 7Zip or other tools. Then you can see the xml.

Note that the URL for your sitemap is: http://cheapr.me/sitemap_index.xml.gz

from sitemap_generator.

antani avatar antani commented on July 16, 2024

Thanks, I tried to expand the sitemap_index.xml.gz file - this file
contains - sitemap_index.xml
sitemap_index.xml file looks like :



http://cheapr.me/sitemap1.xml.gz
2011-11-24T04:12:27+00:00

Is the "loc" element pointing correctly ?

Thanks,

Ved
http://ved-antani.com

On Fri, Nov 25, 2011 at 1:05 AM, Karl Varga <
[email protected]

wrote:

The sitemaps are compressed using GZip. You can uncompress them using
WinZip, 7Zip or other tools. Then you can see the xml.

Note that the URL for your sitemap is:
http://cheapr.me/sitemap_index.xml.gz


Reply to this email directly or view it on GitHub:
#51 (comment)

from sitemap_generator.

kjvarga avatar kjvarga commented on July 16, 2024

Yes it's correct. http://cheapr.me/sitemap1.xml.gz is the sitemap file with your '/view' URL in it. You can remove the :host option from your call to add() now because everything is working correctly.

from sitemap_generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.