Jump to content

*SOLVED* https in google results?


ngruy

Recommended Posts

This is something really weird which I have never heard before, as far as I know that's true that https sites are not picked up by google. I think you should check your pages once again to google. If they are showing the same thing once again, means someone might have done updation to your site about which you might not be knowing.

Link to comment
Share on other sites

More weird....i add a "like" facebook button to CMS pages with facebook code

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.mysite.com&layout=standard&show_faces=true&width=250&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:250px; height:80px;" allowTransparency="true"></iframe>



or

[removed][removed]



but when someone "like", in the wall appear my site URL with HTTPS!!

I don´t know how to think, maybe i have some extrange code in .htaccess??.. i have this:


# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
RewriteEngine on
RewriteCond %{HTTP_HOST} ^myurl.com$ [NC]
RewriteRule ^(.*)$ http://www.myurl.com/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^myurl.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myurl.com$
RewriteRule ^index\.html$ "http\:\/\/www\.myurl\.com" [R=301,L]

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E]


Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset ETag
FileETag None


Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset ETag
FileETag None


order allow,deny
allow from all




 Header set Cache-Control max-age=0



AddOutputFilterByType DEFLATE text/javascript application/javascript text/css application/xhtml+xml text/html
FileETag none

Header set Cache-Control "max-age=2592000"


Header set Cache-Control "max-age=604800"


Header set Cache-Control "max-age=600"


Header unset Cache-Control







Any help would be very apreciated, thanks!

Link to comment
Share on other sites

OK....i have a very large night today....but i find it!

For some reason the bookmark and search use a "https" so google cache it in https ...

bookmark

[removed]addBookmark('https://www.mysite.com/', 'Web La site')



how can i fix this?

in modules/blocksearch/blocksearch-top.tpl i modified

<form method="get" action="{$base_dir_ssl}search.php" id="searchbox">


to

<form method="get" action="{$base_dir}search.php" id="searchbox">



and now the result page are in http

Link to comment
Share on other sites

While Google could eventually take the new site (version non-HTTPS),It might be better to use 301 permanent redirects from the HTTPS version tothe HTTP version.This will help Google to delete the old site of the index and help
pass all incoming links (PR) and users to the new version of the site.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 5 months later...

Hi, funally i find a solution for this problem!, i tested for 2 month and all the "https" in search results disapear and the correct link was listed.

 

1- Create a second robots.txt, calling it robots_ssl.txt Upload this file to the root level of your domain.

 

User-agent: *
Disallow: /

 

2- A the following commands to your .htaccess file in the root document folder of your webserver:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt

 

This command instructs the webserver to direct any requests for the robots.txt file made on port 443 (used for SSL web connections rather than port 80 for standard web connections) to the second file that we created, disallowing indexing.

Link to comment
Share on other sites

  • 2 weeks later...

I think it is to do with the caconocal url module. I just checked the module on a version of Prestashop where this is not an issue and there seems to be a difference here in canonicalurl.php:

 

Packaged with prestashop 1.3.1.1

function hookHeader($params)
{
 global $smarty, $protocol_link, $rewrited_url;

 $canonicalUrl = Configuration::get('CANONICAL_URL');
 $ps_request = str_replace(__PS_BASE_URI__, '', $_SERVER['REQUEST_URI']);

 if (strlen(Configuration::get('CANONICAL_URL')) > 0)
 $smarty->assign('canonical_url', $protocol_link.$canonicalUrl.$_SERVER['REQUEST_URI']);
 return $this->display(__FILE__, 'canonicalurl.tpl');
}

 

Packaged with prestashop 1.3.7.0

 

public function hookHeader($params)
{
 global $smarty;

 $canonicalUrl = Configuration::get('CANONICAL_URL');
 $ps_request = str_replace(__PS_BASE_URI__, '', $_SERVER['REQUEST_URI']);
 $protocol_link = ((Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://');
 if (strlen(Configuration::get('CANONICAL_URL')) > 0)
  $smarty->assign('canonical_url', $protocol_link.$canonicalUrl.Tools::htmlentitiesUTF8(rawurldecode($_SERVER['REQUEST_URI'])));
 return $this->display(__FILE__, 'canonicalurl.tpl');
}

 

Plus a couple of other referrences to https. The older version does not seem to check if SSL is enabled while the new one does and if true then lists the https:// as the canonical url which is not what we want!

 

Does anyone have any advice on how to edit the canonical.php pacakaged with 1.3.7.0 so that it disregards whether ssl is enabled?

Link to comment
Share on other sites

@ngruy if I just impemented your robots.txt solution without a 301 redirect for https traffic won't I lose out on my google rankings? I have set up a 301 redirect to redirect all https traffic to https EXCEPT those pages that need it, but it causes a security error in IE - any ideas?

Link to comment
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
×
×
  • Create New...