Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

Bingo.  Jack, you are the man.  Changing define('DIR_FS_CATALOG' in mysite.com/includes/configure.php to the actual path worked.  Thank you!


Quidquid latine dictum sit, profundum viditur.

Share this post


Link to post
Share on other sites

Hi, I 've installed and everything works fine. How can I add a link in my front end in order for the customers to get human readable sitemap?

 

Thnks

Edited by xtrgeo

Share this post


Link to post
Share on other sites

That's not the purpose of this addon. While customers can view it, it is really just meant for the search engines. What you want is handled by the Sitemap SEO addon.

Share this post


Link to post
Share on other sites

That's not the purpose of this addon. While customers can view it, it is really just meant for the search engines. What you want is handled by the Sitemap SEO addon.

Thank you very much for the informations!

Share this post


Link to post
Share on other sites

Hi Jack,

It seems I'm addicted to your work... ^_^'

I have installed the latest version 1.9 of your updated script and I have noticed that for ONLY category URL paths, specials caracters are missing and each line is duplicated like this :

http://www.xxx.com/consoles-de-salon-xbox-360-pices-dtaches-c-124_4_30.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-xbox-360-pices-dtaches-c-124_4_30.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-xbox-360-rparation-c-124_4_31.html	        2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-xbox-360-rparation-c-124_4_31.html	        2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-consoles-c-124_5_32.html	        2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-consoles-c-124_5_32.html	        2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-dveloppement-c-124_5_33.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-dveloppement-c-124_5_33.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-installation-c-124_5_34.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-installation-c-124_5_34.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-accessoires-c-124_5_35.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-accessoires-c-124_5_35.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-pices-dtaches-c-124_5_36.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-pices-dtaches-c-124_5_36.html	2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-rparation-c-124_5_37.html        2016-08-08	weekly	0.5
http://www.xxx.com/consoles-de-salon-wii-wii-u-rparation-c-124_5_37.html        2016-08-08      weekly  0.5

Product listing is ok...

Do you know a fix for this ?

Thanks !

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

About the latest release 1.9 I have updated from oscommerce addons website, the googlesitemap/index.php file is 1.8 only and the cancellation of mobile from admin is not supported.
I think you have forgotten to share your latest 1.9 script.


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@@milerwan The version you have is the latest. The number in the index.php file just wasn't changed.

 

For the duplicate links, I've never seen that before. The only things I can think of is if your shop uses linked products or it is due to more than one language being used (assuming that is the case). But other shops using both of those have used this addon and it has never been an issue so I doubt it is either. This is something that would require troubleshooting to fix. I'm not sure what the search engines will due when there are duplicate links. If they just ignore them, then you can too. Keep an eye on the map section of webmaster tools (search console) and see if google complains about it.

Share this post


Link to post
Share on other sites

Download and extract the files from the package. There are instructions in it.

Share this post


Link to post
Share on other sites

Hi Guys ,

 

 

Any one can help . 

 

I have installed this plugin and everything is working fine ,

 

I need all datas to be writen in one file - sitemap.xml

 

not as seperate catgory.xml , product.xml

 

Thanks in advance

 

Looking forward for active people to help ASAP

Share this post


Link to post
Share on other sites

This addon won't do that. There's no reason, that I can think of, why you would want to do that.  If someone or some SEO test site is saying you need it, just ignore that since it is not correct.

Share this post


Link to post
Share on other sites

Hello to all,

         is there a way to know if this contribution is working fine?

I'm thinking that there is something wrong. It means that my shop is not "in the air".

If I search by google an item, many times the result doesn't show my shop; but if I search using the follow keys: webshop_name item_to_search of course google finds anything.

OK, I know there is the googlesitemap/index.php and it says there are no problems.

In the Google's webmaster tools, I find the /catalog/sitemapindex.xml on the search console

Maybe the robots.txt the origin of the problems?

I'm using an old version of robots.txt (it comes from the 2.2 version):

Disallow: /catalog/includes
Disallow: /catalog/cgi-bin
Disallow: /catalog/account.php
Disallow: /catalog/account_edit.php
Disallow: /catalog/account_history.php
Disallow: /catalog/account_history_info.php
Disallow: /catalog/account_password.php
Disallow: /catalog/add_checkout_success.php
Disallow: /catalog/address_book.php
Disallow: /catalog/address_book_process.php
Disallow: /catalog/advanced_search.php
Disallow: /catalog/checkout_confirmation.php
Disallow: /catalog/checkout_payment.php
Disallow: /catalog/checkout_payment_address.php
Disallow: /catalog/checkout_process.php
Disallow: /catalog/checkout_shipping.php
Disallow: /catalog/checkout_shipping_address.php
Disallow: /catalog/checkout_success.php
Disallow: /catalog/contact_bean.php
Disallow: /catalog/cookie_usage.php
Disallow: /catalog/create_account.php
Disallow: /catalog/create_account_success.php
Disallow: /catalog/login.php
Disallow: /catalog/password_forgotten.php
Disallow: /catalog/popup_image.php
Disallow: /catalog/shopping_cart.php
Disallow: /catalog/product_reviews_write.php

User-agent: Googlebot-Image
sitemap: my_domain_name/catalog/sitemapindex.xml
Disallow: /catalog/

I just added the row "sitemap: http://domain_name/catalog/sitemapindex.xml" even if I don't think it is the problem.

Is really the robots.txt the problem?

Are there somebody that could help me to understand, please?

I'm using the "SEO Header Tags - Reloaded" too. The results is that nothing are working as I would.

Thanks

Ciao!

Share this post


Link to post
Share on other sites

@@wild.lucifero I'm not sure what you mean by nothing is working since your description of things, like no errors when you run the script shows it is working. I suspect you are saying your pages are not listing well (top 20). That isn't accomplished by installing this and other SEO-type addons. They are needed, to be sure, but will not cause your pages to rank well unless you are in a market that has little competition. You need to work on optimizing your pages for the search engines.

 

You've made a mistake in your robots file. The last three lines should be

User-agent: Googlebot-Image
Disallow: /catalog/
sitemap: my_domain_name/catalog/sitemapindex.xml

Share this post


Link to post
Share on other sites

 

@@wild.lucifero I'm not sure what you mean by nothing is working since your description of things, like no errors when you run the script shows it is working. I suspect you are saying your pages are not listing well (top 20). That isn't accomplished by installing this and other SEO-type addons. They are needed, to be sure, but will not cause your pages to rank well unless you are in a market that has little competition. You need to work on optimizing your pages for the search engines.

 

You've made a mistake in your robots file. The last three lines should be

User-agent: Googlebot-Image
Disallow: /catalog/
sitemap: my_domain_name/catalog/sitemapindex.xml

Really many thanks for your support. I don't pretend that my shop is on top 20. My problem is that my shop isn't on the google's list. I tryed to search one of my pages simply by the item code on google and it doesn't list my shop... So, could you suggest me something to start to learn about the optimizing my pages for the search engines? I thought that the contributions (XML Sitemap and SEOs) should do this optimization. I'm having this problem since a long time; for this reason I upgraded the shop to 2.3.4 and added XML Sitemap SEO + SEO Header tag thinking to solve the ranking problem. But didn't happened. So, I'm agree with you: I need to work on optimizing the pages for the search engines. How should I do it? I don't want to spend money for specialized workers, so I would selfmade. And I know the argument is complex, but I have to start from somewhere.

Why do some of my pages are listed on google and some of another are not listed? I usually insert the items on my store on the same way (generic description (title), description, price, item-code, weight, etc) but the ranking is different.

Please help me.

Thanks again.

Ciao!

Share this post


Link to post
Share on other sites

@@wild.lucifero Unless your site is very new, google will almost certainly have some of your pages listed. Try using this in the search box of google:

 

site:your domain name

 

That will return everything google has indexed. For new sites, you may only see a few links. For sites that have been around for a while over 1,000 is not uncommon.  The links are not listed until google visits them and they don't do that all at once. If you look at the sitemaps in googles search console, they will show how many links have been indexed. That will increase over time as they visit them. For established sites, that can happen in a few days. For new sites, or sites that have not been listed, it can take months.

 

As mentioned, installing the SEO addons is just the first step, albeit a very important one.

Share this post


Link to post
Share on other sites

Hi Jack,

 

Couldnt find anything on this during a quick scan of the previous pages.

 

I have just added .htaccess code to my site to redirect the whole site to SSL as per post #9 of this thread: http://forums.oscommerce.com/topic/410451-time-to-get-secure-if-you-havent-already/

 

When I generate a new sitemap it generates the links as HTTP - is there a way I can change the sitemap so it will generate all links as HTTPS ?

 

Many Thanks


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

Hi Heather - Just adding a redirect as mentioned in that thread is not the correct way to switch to full ssl. The redirect is needed to properly canonicalize the urls but the shops configure files need to be changed too. The domain name in this addon is built by using the http_server setting from the configure file. If that is not set to https, then it is not set up correctly for a shop using full ssl. Please make that change and let me know if it still fails to generate the urls properly.

Share this post


Link to post
Share on other sites

@@Jack_mcs Thanks Jack - I really should have known that - all is good now. :blush:


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

Hi @@Jack_mcs !

 

I have just installed the 1.9 Version of Google-XML Sitemap on my 2.3 BS Edge Shop.

I cant make a cronjob on my webspace, so I start the script manually. There are no errors,

but the Sitemapindex.xml is empty - not at all, looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="gss.xsl"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.9">
</sitemapindex>

First the first line dissappears due to a missing "." in front of the "=" in line 541 of the sitemap.class.php.

But all the other entrys are missing, too. No matter, if I activate some of the additional sitemaps in admin.

The products and categories sitemaps are filled correctly, but without index nothing goes ;)

 

Can you help me ? 

Thank you ! See Ya !

Denzel.

Share this post


Link to post
Share on other sites

Hi @@Jack_mcs,

 

it's me again... Now I figured out, that if I set the "Standart Pages Map" to true, everything goes like it should.

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.9">
	<sitemap>
		<loc>http://www.nazzalstraumhochzeit.de/sitemapcategories.xml</loc>
		<lastmod>2016-12-20</lastmod>
	</sitemap>
	<sitemap>
		<loc>http://www.nazzalstraumhochzeit.de/sitemapimages.xml</loc>
		<lastmod>2016-12-20</lastmod>
	</sitemap>
	<sitemap>
		<loc>http://www.nazzalstraumhochzeit.de/sitemappages.xml</loc>
		<lastmod>2016-12-20</lastmod>
	</sitemap>
	<sitemap>
		<loc>http://www.nazzalstraumhochzeit.de/sitemapproducts.xml</loc>
		<lastmod>2016-12-20</lastmod>
	</sitemap>
</sitemapindex>

But no matter what else is set to true, if I set the "Standart Pages Map" to false, the index looks like above again  :wacko:

 

No idea...

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

That's a strange one. There are checks in the code to see if the pages file is to be ran but it only affects the code for the pages file. So I can't guess at what might be causing this for you.

Share this post


Link to post
Share on other sites

Hi @@Jack_mcs !

 

I got it  :D This is the section of sitemap.class.php where the SitemapIndex.xml is build:

/**
 * Function to generate sitemap index file 
 * @[member=author] Bobby Easland 
 * @version 1.1
 * @[member=Return] boolean
 */	
	function GenerateSitemapIndex(){
		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
		$content = '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable
		$content .= '<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.9">' . "\n";		
		$pattern = defined('GOOGLE_SITEMAP_COMPRESS')
				     ?	GOOGLE_SITEMAP_COMPRESS == 'true'
					 		?	"{sitemap*.xml.gz}"
							: 	"{sitemap*.xml}"
					 :	"{sitemap*.xml}";
		foreach ( glob($this->savepath . $pattern, GLOB_BRACE) as $filename ) {
		   if ( preg_match('/index/i', $filename) ) continue;
		   if ( preg_match('/manufacturers/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_MANU != 'true' ) continue;
		   if ( preg_match('/pages/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_PAGES != 'true' ) continue;
		   if ( preg_match('/specials/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_SPECIALS != 'true' ) continue;
		   if ( preg_match('/topics/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_TOPICS != 'true' ) continue;
		   if ( preg_match('/mobile/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_IMAGES != 'true' ) continue;
		   if ( preg_match('/mobile/i', $filename) && GOOGLE_XML_SITEMAP_CREATE_MOBILE != 'true' ) continue;
		   $content .= "\t" . '<sitemap>' . "\n";
		   $content .= "\t\t" . '<loc>'.$this->base_url . basename($filename).'</loc>' . "\n";
		   $content .= "\t\t" . '<lastmod>'.date ("Y-m-d", filemtime($filename)).'</lastmod>' . "\n";
		   $content .= "\t" . '</sitemap>' . "\n";		   		
		} # end foreach
		$content .= '</sitemapindex>';
		return $this->SaveFile($content, 'index');
	} # end function

First, again... In line 541 the dot in front of the "=" is missing. 

 

Second: The savepath in line 548 is the serverpath: /homepages/1/a123456789/htdocs/mysite.de/

The script tries to find the sitemaps based on parts of their filenames: 

 

preg_match('/index/i', $filename)

preg_match('/manufacturers/i', $filename)

 

and so on. Unfortunately it looks for /pages/ too. If you have watched closely,

you know that my serverpath contains /homepages/1/a123456789/htdocs/mysite.de/

 

Thats the reason, why "Enable Standart Pages" was the only way to get some output. 

 

The solution is easy: Just tell the script to search for the /sitemappages/. The whole

Function now looks like this:

/**
 * Function to generate sitemap index file 
 * @[member=author] Bobby Easland 
 * @version 1.1
 * @[member=Return] boolean
 */	
	function GenerateSitemapIndex(){
		$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
		$content .= '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n"; //human readable
		$content .= '<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.9">' . "\n";		
		$pattern = defined('GOOGLE_SITEMAP_COMPRESS')
				     ?	GOOGLE_SITEMAP_COMPRESS == 'true'
					 		?	"{sitemap*.xml.gz}"
							: 	"{sitemap*.xml}"
					 :	"{sitemap*.xml}";
		foreach ( glob($this->savepath . $pattern, GLOB_BRACE) as $filename ) {
		   if ( preg_match('/sitemapindex/i', $filename) ) continue; 
		   if ( (preg_match('/sitemapmanufacturers/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_MANU != 'true' ) continue; 
		   if ( (preg_match('/sitemappages/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_PAGES != 'true' ) continue; 
		   if ( (preg_match('/sitemapspecials/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_SPECIALS != 'true' ) continue; 
		   if ( (preg_match('/sitemaptopics/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_TOPICS != 'true' ) continue; 
		   if ( (preg_match('/sitemapimages/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_IMAGES != 'true' ) continue; 
		   if ( (preg_match('/sitemap_mobile/i', $filename)) && GOOGLE_XML_SITEMAP_CREATE_MOBILE != 'true' ) continue; 
		   $content .= "\t" . '<sitemap>' . "\n";
		   $content .= "\t\t" . '<loc>'.$this->base_url . basename($filename).'</loc>' . "\n";
		   $content .= "\t\t" . '<lastmod>'.date ("Y-m-d", filemtime($filename)).'</lastmod>' . "\n";
		   $content .= "\t" . '</sitemap>' . "\n";		   		
		} # end foreach
		$content .= '</sitemapindex>';
		return $this->SaveFile($content, 'index');
	} # end function

Now it does what it should do for me. Hope I could help someone not to despair on this old contrib  :lol:

 

SEE YA

Denzel.

Share this post


Link to post
Share on other sites

Good catch on the missing dot. I'm not sure the pages change will work for all sites due to them using the mobile addon but I haven't tested it so it may.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×