Switching to HTTPS - redirect question

Switching to HTTPS - redirect question - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Switching to HTTPS - redirect question error on your web browser. Problem :


Following the recent Google announcements about improved ranking for sites running on https we have a number of clients asking about this. Is it safe to just 301 redirect all pages to their SSL equivalent, for example in a common PHP include file:



if($_SERVER['HTTPS']!="on")
$redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location:$redirect",true,301);
exit();



Obviously I'm aware this is also possible within a .htaccess file but that cannot be modified in our case.



Obviously all internal links would be switched to https:// links but obviously we need to sort out incoming links from Google and elsewhere.



Is this a sound approach? Are there any other gotchas to be aware of?


Solution :

Perfectly fine to 301 redirect all HTTP pages to their HTTPS equivalent. Either via httpd.conf on Apache servers, .htaccess rewrites or with a PHP include like your example. Any inbound links would pass about 97% of weight through a 301 redirect.



The best handling internally would be to not use the protocol for internal linkage so that compatibility is maximised sitewide with minimal intervention.



Https as a ranking signal is minimal, it is also not even categorically confirmed that there are site ranking benefits to be had by serving all URL's over https (this algorithm change affects on a per URL basis). That said however, John Mueller at Google recently confirmed that if you already have TLS on the domain, switching everything over to https ought to be a no-brainer (so more for the benefit of visitor trust than rankability).



This isn't straight forward of course for every site depending on the amount of embedded content it may have that is served on http within HTTPS pages (e.g. put an iframe, script, image, etc. that uses HTTP on a page that uses HTTPS). In any instances such as this, visitors could be seeing the red cross over the padlock or red/yellow browser warnings constantly on a site without each of these instances being taken care of and handled appropriately.



It also depends on Competition.
For example, I saw 2-3 sites from the 2th page in google.gr with https to come on 1th page.



As Google says it has affected 1% till now.


We hope that this article has helped you resolve the seo, php, redirects error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=