Module

Developer
Supported

Sitemap Module

ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Sitemap is HTML Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.

General

eastwooddesign
eastwooddesign

I am getting this error after submitting my sitemap.php url to google

Any advice?

PutYourLightsOn
# 1
Developer
PutYourLightsOn

which error?

eastwooddesign
# 2
eastwooddesign

I posted the http://www.domain.com/sitemap.php url to google in google webmaster tools

after google checked the url I am getting this error in Google Webmaster tools:

Sitemap is HTML
Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.

eastwooddesign
# 3
eastwooddesign

I have a template at site/sitemap
the sitemap.php file is in the root directory

I am removing the index.php in EE, could this be a problem?

ie: domain.com/site/sitemap instead of domain.com/index.php/site/sitemap

Should - $sitemap_url = ‘http://’.$_SERVER[“HTTP_HOST”].’/index.php/’.$template;


become -  $sitemap_url = ‘http://’.$_SERVER[“HTTP_HOST”].$template;


in the sitemap.php file?

When I view sitemap.php in my browser what should I see?  I just get my homepage (site/index template)

My site/sitemap template includes ONLY {exp:sitemap:get}

Also using EE 1.7.0

eastwooddesign
# 4
eastwooddesign

So I made some adjustments in my htaccess file to now included the sitemap.php file.

Now when I view sitemap.php I get the following error

XML Parsing Error: no element found
Location: http://www.domain.com/sitemap.php
Line Number 1, Column 2:
-^

PutYourLightsOn
# 5
Developer
PutYourLightsOn

if you email me your site url then i can take a look

Danielle
# 6
Danielle

I am also having the same error with my site - installed everything as described, am removing the index.php from the URL. I did include the sitemap.php in my .htaccess file, but did not remove the index.php from the sitemap.php.

It’s probably something really simple I’m doing wrong and I’ve been staring at it too long - any help is greatly appreciated.
-Danielle

PutYourLightsOn
# 7
Developer
PutYourLightsOn

hi danielle, can you please specify what error you are getting? also please show me lines 14 and 16 of your sitemap.php file.

Danielle
# 8
Danielle
$template 'site/sitemap';

$sitemap_url 'http://'.$_SERVER["HTTP_HOST"].'/index.php/'.$template

I think I may have gotten it working; however, now it’s displaying the attached screenshot, which seems to be fine, but I’m admittedly new to the XML sitemap show, so I’m not 100% sure.

Thank you for your prompt reply!

PutYourLightsOn
# 9
Developer
PutYourLightsOn

yep, that’s exactly how it should look!

Danielle
# 10
Danielle

Great! Thanks so much for your help!

PutYourLightsOn
# 11
Developer
PutYourLightsOn

glad to be of help!

matthewlyle
# 12
matthewlyle

Hi I’m also having this error – “XML Parsing Error: no element found”

Removing index.php but have included sitemap in my .htaccess exclusion.

How did you get this working?

PutYourLightsOn
# 13
Developer
PutYourLightsOn

is the $template variable in sitemap.php set correctly? and does navigating directly to the template work?

matthewlyle
# 14
matthewlyle

This is pretty embarrassing but I realized I had the template set as html instead of xml. Ahem. Thanks anyway! :)