Jump to content

Server Redirect Too Often error in Google Merchant Center


Recommended Posts

My site is not allowing me to have products on google shopping. When I submit the xml file I receive a an error saying Server redirects too often. I have inquired a web developer to help me who is familiar with prestashop. He had a few solutions but none of them worked, however the redirects were cut down. My site started out with http://www.mydomain.com and has now gone to https://mydomain.com. I had force SSL, and that has been removed and fixed. I edited the .htaccess and regenerated the robots.txt. Neither of those worked. Google webmaster tools says robots is 'allowed' for google bot. It has always said it was allowed.

 

Google Adwords has replied with (in short): We realized all of your items were disapproved with the reason "Product pages cannot be accessed." 

 

When we tried to access the page with our bots, it returns an error.
 

 

 

This is because your item page can not be shown when accessing as "googlebot"(Google's crawler). When we tried to see your webpage as "googlebot", it returned many redirect loop and we could not see your webpage.

 

My site is: http://tinyurl.com/kch3wou

 

Thank you for you help!

Link to comment
Share on other sites

I ran some redirect tests, the product you posted redirects to itself from http to https..looks as though all pages are forced https.

 

I did some research and could not find anything helpful.  I will ask dh42 if he can take a look and i will move this post to better area of forum.

  • Like 1
Link to comment
Share on other sites

It says "Product pages cannot be accessed" so I don't know which ones are redirecting on my site. They all eventually become disapproved so I would say all of them.

My XML file has this at the top and then each product. I'm showing one product, they all have the same https://mydomain....

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">

<channel>
<title><![CDATA[MY DOMAIN]]></title>
<description><![CDATA[My Domains offers the ... ]]></description>
<link>https://mydomain.com</link>

<item>
<g:id>SMUS39</g:id>
<title>
<![CDATA[ Harken crossover block 44mm ]]>
</title>
<description>
<![CDATA[
The description....
]]>
</description>
<link>
<![CDATA[
https://mydomain.com/hardware/39-harken-crossover-block-organizer.html
]]>
</link>
<g:image_link>
<![CDATA[
https://mydomain.com/106-thickbox_default/harken-crossover-block-organizer.jpg
]]>
</g:image_link>
<g:condition>new</g:condition>
<g:product_type>
<![CDATA[ Products Hardware ]]>
</g:product_type>
<g:google_product_category>
<![CDATA[
Vehicles & Parts > Vehicle Parts & Accessories > Watercraft Parts & Accessories > Sailboat Parts
]]>
</g:google_product_category>
<g:availability>in stock</g:availability>
<g:price>155.23 USD</g:price>
<g:gtin>097653016175</g:gtin>
<g:brand>
<![CDATA[ Harken, Inc ]]>
</g:brand>
<g:mpn>
<![CDATA[ HAR 1984 ]]>
</g:mpn>
<g:shipping_weight>1.00 lb</g:shipping_weight>
<g:shipping>
<g:country>US</g:country>
<g:price>0.00 USD</g:price>
</g:shipping>


I al asked google for more information to explain further since this problem has been causing a nightmare that nobody can figure out. they replied with "the issue is not with accessibility but the URL apparently leads to redirects which can't be crawled, will you be able to check that?"

Edited by generalexperts (see edit history)
Link to comment
Share on other sites

I have changed it to https://www.mydomain.com. I asked google and they said that would not be the issue, but I did it anyway. however, most of my things on google, ie merchant center and webmaster tools still say www.mydomain.com and not domain.com.

 

[i just edited merchant center to now say https://mydomain.com] does that help?

 

El, I am surprised when you say there is a redirect to force https. I removed that from my .htaccess. I don't know what would be triggering that. 

 

Thanks!

Edited by generalexperts (see edit history)
Link to comment
Share on other sites

I have changed it to https://www.mydomain.com. I asked google and they said that would not be the issue, but I did it anyway. however, most of my things on google, ie merchant center and webmaster tools still say www.mydomain.com and not domain.com.

 

They still say that is not an issue...

 

El, I am surprised when you say there is a redirect to force https. I removed that from my .htaccess.

 

every page I visit in your shop (nice work by the way as I know how hard you have worked) is https..I'd leave it that way...assuming you have good keep-alive settings.

  • Like 1
Link to comment
Share on other sites

They have also shown that these temporary redirects may be a problem as well. I tried to remove them but they reappear. It looks to be the same as what is in my .htaccess for images. The permanent ones is what i created for the 24 URL's I have errors for. I guess my site likes to add /brands to urls and create 404 errors :(

 

Capture88.PNG

Link to comment
Share on other sites

This is my .htaccess file. maybe someone can pinpoint something that should be changed.  I do wonder about CloudFare. It is a service I tried and then it didn't work so I disabled it. I went to my hosting side of things and purged the cache....

 

# Start CloudFlare:savvymarina.com rewrite. Do not Edit 
RewriteCond %{HTTP_HOST} ^savvymarina.com 
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] 
# End CloudFlare rewrite.
 
So I deleted this section. Then site didn't work, had to replace old .htaccess for it to work.
 
.htaccess


# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresByType image/gif "access plus 1 month"
	ExpiresByType image/jpeg "access plus 1 month"
	ExpiresByType image/png "access plus 1 month"
	ExpiresByType text/css "access plus 1 week"
	ExpiresByType text/javascript "access plus 1 week"
	ExpiresByType application/javascript "access plus 1 week"
	ExpiresByType application/x-javascript "access plus 1 week"
	ExpiresByType image/x-icon "access plus 1 year"
</IfModule>

FileETag INode MTime Size
<IfModule mod_deflate.c>
	<IfModule mod_filter.c>
		AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
	</IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again


# block visitors referred from semalt.com
RewriteEngine on
RewriteCond %{HTTP_REFERER} semalt.com [NC]
RewriteRule .* - [F]

AuthName "Savvy Marina"
AuthUserFile "/home1/kristio5/.htpasswds/public_html/mydomain/passwd"
# Start CloudFlare:mydomain.com rewrite. Do not Edit 
RewriteEngine On 
RewriteCond %{HTTP_HOST} ^mydomain.com 
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] 
# End CloudFlare rewrite.

<FilesMatch "\.(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache\.com/.*$ [NC]
RewriteRule \.(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]

# ----------------------------------------------------------------------
# CORS-enabled images (@crossorigin)
# ----------------------------------------------------------------------
# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
	# mod_headers, y u no match by Content-Type?!
	<FilesMatch ".(gif|png|jpe?g|svg|svgz|ico|webp)$">
	  SetEnvIf Origin ":" IS_CORS
	  Header set Access-Control-Allow-Origin "*" env=IS_CORS
	</FilesMatch>
  </IfModule>
</IfModule>
# ----------------------------------------------------------------------
# force the "www." at the beginning of URLs or vise versa as long as your using one or the other only and not both!
# ----------------------------------------------------------------------
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]


# ----------------------------------------------------------------------
# Cross-domain AJAX requests
# ----------------------------------------------------------------------
# Serve cross-domain Ajax requests, disabled by default.
# enable-cors.org
# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
#  <IfModule mod_headers.c>
#	Header set Access-Control-Allow-Origin "*"
#  </IfModule>
Edited by generalexperts (see edit history)
Link to comment
Share on other sites

I received information back from my hosting provider. They replied with

 

 

 

We are unable to see any redirects on the url that you listed (it responds with a 200 code which means that the first request served the content, so it did not change the url). However the application does rewrite the requests to your website. Since the requests are not redirecting, or timing out we cannot troubleshoot that problem at this time (we would have to see the problem occur to fix it).

The two problems that might cause issues are that you are rewriting product information here:
/home1/kristio5/public_html/.htaccess

where you have (the web addresses just have extra backslashes) these:
---------------------------------------------------------------------------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^furler\-pre\-feeders\-fairleads\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^mid\-range\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteOptions inherit
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^small\-boat\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]
---------------------------------------------------------------------------------------------------------------

and then rewriting some of the same information here:
/home1/kristio5/public_html/mydomain/.htaccess

when you leave rewriteoptions inherit on, and do not restart the rewrite engine (so if there are conflicts they could cause a loop)

This is at the top of the .htaccess file
---------------------------------------------------------------------------------------------------------------
RewriteOptions inherit

RewriteEngine on
---------------------------------------------------------------------------------------------------------------

Probably you would need to change the second file
/home1/kristio5/public_html/mydomain/.htaccess

to something like this (only changing the top lines - removing the "RewriteOptions inherit"
---------------------------------------------------------------------------------------------------------------
RewriteEngine off
RewriteEngine on
---------------------------------------------------------------------------------------------------------------

But since the problem is not occurring right now I cannot test whether that would resolve it. Another option would be removing the redirects that affect the add on domain from the public_html .htaccess

and change it to this
---------------------------------------------------------------------------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^furler\-pre\-feeders\-fairleads\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^mid\-range\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteOptions inherit
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^small\-boat\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]
---------------------------------------------------------------------------------------------------------------

or just this:
---------------------------------------------------------------------------------------------------------------
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
---------------------------------------------------------------------------------------------------------------

without any redirects.

 

I tried this (below) and gave it a day and it did not make any change

 

changed 'public_html/mydomain/.htaccess' top two lines.

Removed "RewriteOptions inherit" from top line
Now it reads:
RewriteEngine off
RewriteEngine on
 
I've resubmited my sitemap and the google shopping xml and now waiting to see what happens. Am I capable of seeing if my site redirects any faster, instead of waiting to see if this isn't going to work?
 
I have put things back to the way they were. Now I've changed the public_html htaccess to just read:
 
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
 
(Edit): That above did not work. Now I've tried changing the .htaccess to just the publichtml htaccess
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^furler\-pre\-feeders\-fairleads\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^mid\-range\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]

RewriteOptions inherit
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{HTTP_HOST} !^mydomain.com$
RewriteRule ^small\-boat\-blocks\/brands$ "https\:\/\/mydomain\.com\/brands" [R=301,L]
Edited by generalexperts (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...