Hi Mikelli,
quote:
if I wanted to keep spider bots from indexing both a http & https version of a page what would a rewrite look like if all I wanted indexed (thus no duplicate content) is the https://www.site.com version? I have put in place a 301 redirect, I just want to cover all bases.
To convert an entire website to SSL secured https:// and re-submit the site to search engines for indexing, my procedure is:
(1) .htaccess# rename file .htaccess
AddDefaultCharset UTF-8
<ifModule mod_headers.c>
# Enable HSTS, tells the browser to always use HTTPS
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
# Enable HTTP Keep-Alive to allow the same TCP connection to send and receive multiple HTTP requests, thus reducing the latency for subsequent requests
Header set Connection keep-alive
</ifModule>
# ======================================================
# URL Rewrite Rules
# ======================================================
<IfModule mod_rewrite.c>
Options -Multiviews -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.site.com/$1 [R,L]
# REDIRECT to www
RewriteCond %{HTTP_HOST} ^site\.com$ [NC]
RewriteRule ^(.*)$ https://www.site.com/$1 [R=301,L]
# REDIRECT index.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://www.site.com/$1 [R=301,L]
</IfModule>(2) Ecommerce Templates Admin PanelOpen STORE ADMIN ==> Main Settings
Both
Store URL: and
HTTPS Store URL: must be set to https://www.site.com
(3) includes.php, site.css, website template, website page filesMake sure all links specify secure
https://You can Search and Find references to http:// and replace those with https://
And in PROD ADMIN, if any pages entered in there contain embedded images or links to other pages on your site, make sure all those links are https:// as well.
(4) Duplicate content: Consider whether you really do (or do not) want all your products.php pages indexed.Personally, I don't consider their is much positive benefit in having the
products.php pages indexed by search engines. The multi-page content there changes frequently and is merely
duplicate information of that contained in more explicit detail on your
proddetail.php pages. And if you have a
manufacturers.php page, then there will be a stack more
products.php pages generated; all the same duplicate stuff yet again, just ordered differently.
So you need to decide what you want indexed
as a priority, and what you don't want indexed. What pages do you actually want visitors to land on? Instruct search bots accordingly.
EITHER
products.php ... the summary pages.
OR
proddetail.php ... the more detailed and beefy keyword rich product pages.
OR both ... in which case you leave it for Search Engines to decide which finally gets displayed in search results, and can indeed lead to duplicate content issues.
Make it simple for search bots to index your site properly, as you want. This is what I do on
products.php<meta name="robots" content="noindex, follow">That instructs bots to follow links through to each of your
proddetail.php pages, index that content (as a priority over the brief
products.php content), and list those
proddetail.php Titles and Short Descriptions in search results.
(5) robots.txtUser-agent: *
Sitemap: https://site.com/sitemap.xmlUpload new robots.txt to server.
(6) sitemap.xmlGenerate a new "sitemap.xml" file containing all absolute https:// website page links.
Upload to server.
(7) Google Webmaster Tools account.ADD A PROPERTY (new website address to index) for:
https://site.com
AND
https://www.site.com
Why do you need both? Because Google says so.
Verify ownership of both.
Next, under Site Settings,
Confirm your preferred domain. You will get an email message asking you to do this. In your case, you will want to select:
> Display URLs as www.site.com
Next, under Crawl => Sitemaps, submit your new "sitemap.xml" file for indexing.
From then on, the only Google Webmaster Tools account you need to look at is the: https://www.site.com
(8) Bing Webmaster Tools account.Much the same deal.
(9) Google Analytics, Statcounter, Google+, YouTube, Facebook, Twitter, Pinterest, whatever else contains links to your website.Change website URL in all those accounts to https://
It only takes a week or two for search engines to re-index your https:// website. A little short term pain for long term gain. Trust that helps and makes sense.
Gary