Switching from Http to Https, but what about images and image link juice?
-
Hi Ya'll.
I'm transitioning our http version website to https. Important question:
Do images have to have 301 redirects? If so, how and where?
Please send me a link or explain best practices.
Best,
Shawn
-
Shawn124, whenever you move from HTTP to HTTPs, you'll need to set up the 301 permanent redirects for pages on the site only. The other elements, such as images, JavaScript (if they're external files), and .CSS files will need to be changed only in the code so that they reference the new HTTPs URLs, and not HTTP.
If you load an HTTP element (such as an image that uses the full URL in it's reference rather than the image filename only) on an HTTPs URL, then the browser will give you an error. So generally you need to do two things:
-
set up 301 Permanent Redirect for the page URLs.
-
search the entire website for all references to HTTP and change them to HTTPs (unless you're linking out to an external site).
If the site is in WordPress, you can use the Search and Replace plugin to replace it all at once in the database.
-
-
If you 301 redirect all HTTP URLs to HTTPS On the origin server,
To Move the origin server the HTTP to HTTPS On the origin server your redirects on your images will follow
#1
NGINX
Add the following to your Nginx config.
server { listen 80; server_name domain.com www.domain.com; return 301 https://domain.com$request_uri; }
Apache
Add the following to your
.htaccess
file.RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
(TOOL Apache htaccess to NGINX config tool https://winginx.com/en/htaccess)
#2
Search and replace the old HTTP:// URLs to New HTTPS://
http://mydomain.com
tohttps://mydomain.com
http://www.mydomain.com
tohttps://www.mydomain.com
Use CLI or https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
#3
Alert Google that you are migrating to HTTPS https://www.google.com/webmasters/tools/home?hl=en
You will have no issue with your images.
Your link juice will flow as it did before because Google is no longer penalizing multiple redirects (So they SAY BUT don't over use redirects) keep them to a minimum, please.
https://www.deepcrawl.com/knowledge/best-practice/the-zen-guide-to-https-configuration/
https://www.deepcrawl.com/knowledge/best-practice/https-dilemma-security-seo/
#4
If on WordPress using proxy or just have insecure content use
Really Simple SSL: https://wordpress.org/plugins/really-simple-ssl/
Your insecure content is fixed by replacing all HTTP:// URLs with HTTPS://, except links to other external domains. Everything is done dynamically.
If using a Photos on a WAF or Pull CDN Force HTTPS
Connections#5
For example, if you're using a CloudFlare for Photos? You would use page rules to force a 301 redirect HTTPS
https://tools.keycdn.com/curl see #9 in https://www.maxcdn.com/one/tutorial/edge-rules-recipes/
#6
301's will not lose link juice see:
https://moz.com/blog/301-redirection-rules-for-seo
#7
Test using https://www.deepcrawl.com/ & or https://www.screamingfrog.co.uk/seo-spider/
(For a larger picture of the image below about redirect rule changing and link juice click on this URL http://i.imgur.com/vqyT6gm.jpg )
#8
If still needing tips or help read below.
Do images have to have 301 redirects? Yes
Citing:
http://searchengineland.com/http-https-seos-guide-securing-website-246940
"Making the switch from HTTP to HTTPS
- Start with a test server. This is important because it lets you get everything right and test without screwing it up in real time. Even if you are doing the switch without a test server, there’s almost nothing you can do that you can’t recover from, but it’s still best practice to have a plan and have everything tested ahead of time.
- Crawl the current website so that you know the current state of the site and for comparison purposes.
- Read any documentation regarding your server or CDN for HTTPS. I run into lots of fun CDN issues, but it can also be straightforward.
- Get a security certificate and install on the server. This will vary depending on your hosting environment and server setup too much for me to go into details, but the process is usually well-documented.
- Update references in content. This can usually be done with a search-and-replace in the database. You’ll want to update all references to internal links to use HTTPS or relative paths.
- Update references in templates. Again, depending on how you deploy, this might be done with Git or simply Notepad++, but you’ll want to make sure references to scripts, images, links and so on are either using HTTPS or relative paths.
- Update canonical tags. Most CMS systems will take care of this for you when you make the switch, but double-check, because that’s not always the case.
- **Update hreflang tags **if your website uses them, or any other tags such as OG tags for that matter. Again, most CMS systems will take care of this, but it’s best to QA it just in case.
- Update any plugins/modules/add-ons to make sure nothing breaks and that nothing contains insecure content. I commonly see internal site search and forms missed.
- CMS-specific settings may need to be changed. For major CMS systems, these are usually well-documented in migration guides.
- Crawl the site to make sure you didn’t miss any links and nothing is broken. You can export any insecure content in one of the Screaming Frog reports if this is the crawler you are using.
- Make sure any external scripts that are called support HTTPS.
- Force HTTPS with redirects. This will depend on your server and configuration but is well-documented for Apache, Nginx, and IIS.
- Update old redirects currently in place (and while you’re at it, take back your lost links from redirects that haven’t been done over the years). I mentioned during the Q&A portion of the Technical SEO Panel at SMX West that I’ve never had a site drop in rankings or traffic when switching to HTTPS, and a lot of people questioned me on this. Due diligence on redirects and redirect, chains are likely the difference, as this is what I see messed up the most when troubleshooting migrations.
- Crawl the old URLs for any broken redirects or any redirect chains, which you can find in a report with Screaming Frog.
- **Update sitemaps **to use HTTPS versions of the URLs.
- **Update your robots.txt file **to include your new sitemap.
- Enable HSTS. This tells the browser always to use HTTPS, which eliminates a server-side check and makes your website load faster. This can also cause confusion at times, since the redirect will show as 307. It could have a 301 or a 302 behind it, though, and you may need to clear your browser cache to see which.
- Enable OCSP stapling. This enables a server to check if a security certificate is revoked instead of a browser, which keeps the browser from having to download or cross-reference with the issuing certificate authority.
- Add HTTP/2 support.
- Add the HTTPS version of your site to all the search engine versions of webmaster tools that you use and load the new sitemap with HTTPS to them. This is important, as I’ve seen traffic drops misdiagnosed because they saw the traffic in the HTTP profile drop, when the traffic in reality moved to the HTTPS profile. Another note for this is that you do not need to use the Change of Address Tool when switching from HTTP to HTTPS.
- Update your disavow file if you had one for the HTTPS version.
- Update your URL parameter settings if you had these configured.
- Go live!
- In your analytics platform, make sure you update the default URL if one is required to ensure that you are tracking HTTPS properly, and add notes about the change so that you know when it occurred for future reference.
- Update your social share counts. There’s a lot of gotchas to this, in that some of the networks will transfer the counts through their APIs, while others will not. There are already guides for this around if you are interested in keeping your share counts.
- Update any paid media, email or marketing automation campaigns to use the HTTPS versions of the URLs.
- Update any other tools such as A/B testing software, heat maps and keyword tracking to use the HTTPS versions of the URLs.
- Monitor everything during the migration and check, double-check and triple-check to make sure everything is going smoothly. There are so many places where things can go wrong, and it seems like there are usually several issues that come up in any switch to HTTPS.
One question I’m often asked is if incoming links should be cleaned up. This is a tremendous amount of outreach and effort. If you have time, then sure; but most likely you’re busy with other things, and I don’t feel it’s necessary. However, you should update the links on any properties that you control, such as social profiles."
** you asked for the best links here are what you need**
- https://yoast.com/dev-blog/move-website-https-ssl/
- https://www.semrush.com/blog/how-to-survive-a-website-migration-semrushchat/?l=en
- https://www.digitalocean.com/community/questions/how-to-redirect-all-traffic-to-https-non-www
- https://moz.com/community/q/301-redirect-all-pictures-when-moving-to-a-new-site
- Link juice
** examplesI have put a lot more below**
- https://www.digitalocean.com/community/questions/how-to-redirect-all-traffic-to-https-non-www
- https://kinsta.com/knowledgebase/redirect-http-to-https/
- https://bjornjohansen.no/redirect-to-https-with-nginx
Unless you have to modify whatever system it is powering them, do you have a CDN? Or using something like AWS S3?
If so your images should move with the rest of the site. If you're posting them on a content delivery network or an AWS S3 whatever it is you must redirect that as well.
- https://yoast.com/dev-blog/move-website-https-ssl/
- https://support.google.com/webmasters/answer/83106?hl=en&ref_topic=6029673
- **https://moz.com/learn/seo/redirection **
- https://moz.com/community/q/301-redirect-all-pictures-when-moving-to-a-new-site
juice will not be lost long is you tell Google your moving the site see the URL below for how to redirect
Some of the systems will have buttons where you'd just click HTTPS others will require you to put the code into the system. I have posted the code below for Nginx as well as Apache.
Redirect from HTTP to https
This last bit will help you tremendously when you’ve not updated every single link on your site yet. You can just add a straight server level redirect from HTTP to https. In NGINX, we do this by having two servers defined in our config, the “right” one; that listens on port 443 and a simple one that listens on port 80 (standard HTTP) and has just this:
server {
listen 80;
server_name yoursite.com www.yoursite.com;
return 301 https://yoursite.com$request_uri;
}This seems to be the fastest way of doing this in NGINX, in Apache you’d do something like this:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]- Tools
- http://www.aleydasolis.com/htaccess-redirects-generator/nonwww-to-www/
- https://yoast.com/research/permalink-helper.php
- http://www.contentforest.com/seo-tools/url-redirect-generator
- https://donatstudios.com/RewriteRule_Generator
- http://www.rapidtables.com/web/tools/redirect-generator.htm
How to force SSL with. htaccess
If you want to force your entire website to go through https, you can add these rules to your .htaccess file:
| |
RewriteEngineOnRewriteCond%{SERVER_PORT}80RewriteRule^(.*)$https://yourdomain.com/$1 [R,L]
|
If your site is in a subfolder, use this code:
| |
RewriteEngineOnRewriteCond%{SERVER_PORT}80RewriteCond%{REQUEST_URI}folderRewriteRule^(.*)$https://yourdomain.com/folder/$1 [R,L]
|
Only replace yourdomain.com with your actual domain name.
Test with
- https://varvy.com/tools/redirects/
- https://varvy.com/pagespeed/hsts.html
- https://varvy.com/mobile/mobile-redirects.html
- http://searchengineland.com/http-https-seos-guide-securing-website-246940
Hope this helps,
Thomas
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Links Questions and advice?
I have a website which has a fair few link assets that are doing very well (a lot of really powerful sites have link to them with follow links) but my commercial pages are not doing as well as a lot of sites without any other investment than (mediocre) links direct to there commercial pages with at least 10% of them carrying the money anchor text. Even pages we have had a few links for with generalized real anchor text and reasonable links do not do as well as the above due to none of them carrying the money keyword? Is it me or does google still rely on links to the commercial page and keywords with anchor text to match the money term?
Intermediate & Advanced SEO | | BobAnderson0 -
Https vs Http Link Equity
Hi Guys, So basically have a site which has both HTTPs and HTTP versions of each page. We want to consolidate them due to potential duplicate content issues with the search engines. Most of the HTTP pages naturally have most of the links and more authority then the HTTPs pages since they have been around longer. E.g. the normal http hompage has 50 linking root domains while the https version has 5. So we are a bit concerned of adding a rel canonical tag & telling the search engines that the preferred page is the https page not the http page (where most of the link equity and social signals are). Could there potentially be a ranking loss if we do this, what would be best practice in this case? Thanks, Chris
Intermediate & Advanced SEO | | jayoliverwright0 -
Google Indexing of Images
Our site is experiencing an issue with indexation of images. The site is real estate oriented. It has 238 listings with about 1190 images. The site submits two version (different sizes) of each image to Google, so there are about 2,400 images. Only several hundred are indexed. Can adding Microdata improve the indexation of the images? Our site map is submitting images that are on no-index listing pages to Google. As a result more than 2000 images have been submitted but only a few hundred have been indexed. How should the site map deal with images that reside on no-index pages? Do images that are part of pages that are set up as "no-index" need a special "no-index" label or special treatment? My concern is that so many images that not indexed could be a red flag showing poor quality content to Google. Is it worth investing in correcting this issue, or will correcting it result in little to no improvement in SEO? Thanks, Alan
Intermediate & Advanced SEO | | Kingalan10 -
How to properly implement HTTPS?
We are looking at implementing HTTPS for our site. I have done a little research but can't find anything recent, http://moz.com/community/q/duplicate-content-and-http-and-https is the most recent thing I found. Does everything in the answers still apply? Should I just do a 301 redirect to all new https? Or add a canonical tag?
Intermediate & Advanced SEO | | EcommerceSite0 -
Strategy After Switching To HTTPS
So we made a big mistake with our website last month. Without thinking things through, our entire website was switched to using a SSL certificate and https urls on all pages of the site. I know it is recommended that SSL is only used on sensitive pages, but we have a lead form on all pages. Of course Google is taking some time to adjust to all of our urls changing. A week later we lost all of our Google search rankings. It has now been about 3 weeks and our site is showing some signs of recovery, but obviously we'd like a quicker recovery. We have done proper 301 redirects throughout the site, but unfortunately our CMS has been a little buggy creating some other problems to fix along the way. So my main question is, how can we speed up the process? I do understand that we stand to lose 5-10% value of our old links due to the redirects. Is there anything else we should be doing to recover quicker though? Also, at this point, would it make any sense to switch back to http urls? Or would that just delay things further? Thanks!
Intermediate & Advanced SEO | | BorisD0 -
Image ALT Descriptions
Due to the way our system is and the way we want to do something. We have to make the description for each image in the ALT. Now this is not just a few words but is actually a few sentences. Is there going to be any negative disadvantage to doing it this way? The positives I see is that it will help with accessibility and atleast the bots will be able to tell what the item is about. The negatives is that maybe this description could be better used elsewhere?
Intermediate & Advanced SEO | | websitesaleslab0 -
Any idea why I can't add a Panoramio image link to my Google Places page?
Hey guys & gals! Last week, I watched one of the Pro Webinars on here related to Google Places. Since then, I have begun to help one of my friends with his GP page to get my feet wet. One of the tips from the webinar was to geotag images in Panoramio to use for your images on the Places page. However, when I try to do this, I just get an error that says they can't upload it at this time. I tried searching online for answers, but the G support pages that I have found where someone asks the same question, there is no resolution. Can anyone help? PS - I would prefer not to post publicly the business name, URL, etc. So, if that info is needed, I can PM. Thanks a lot!
Intermediate & Advanced SEO | | strong11 -
Do outbound links matter?
The value of inbound links is clear but do the number of outbound links matter when it comes to SEO and search engine rankings?
Intermediate & Advanced SEO | | casper4340