HTTPS & 301s
-
Hi
- We have like most set up a redirect from HTTP to HTTPS.
- We also changed our website and set up redirects from .ASP pages to PHP pages
- We are now seeing 2 redirects in place for the whole of the website.
http.www.domain.com > https.www.domain.com (1) >> oldwebpage.asp >> new webpage.php (2)
The question is: Is there anyway of making the redirect 1 and not 2?
thanks
Enver -
Just to make sure I understand. Can you clarify the sequence of the changes and for how long? Do you know if one set of URLs has links to it or was ever indexed.
Let me explain.
It sounds like you had a site that was using http and was an asp site. So you had URLs like
http://www.website.com/file.asp (we will call this URL type A)
You then converted to https so the URLs were like
https://www.website.com/file.asp (we will call this URL type B)
You then updated to a PHP site so now with URLs are like this
https://www.website.com/file.php (we will call this URL type C)
You can setup 301s to go from A to B and then another set to go from B to C. Your question is can you setup a 301 to go from A to C, the answer is yes. You should do this. Anytime you can reduce the number of hops the better.
What you need to think about is, well, that about the A to B and the B to C redirects? Well, I would say at a minimum, you need to eliminate the A to B 301s as you have now decided to skip the "B" and go right to C. That works. What about the B to C 301 redirect? It depends. If you had version B of the website out for a while, and it was indexed by Google and you have links that are built to B version URLs, then yes, you need to leave the B to C redirects. You don't want to lose any of that equity.
Likewise, let's say you have a version D of the site that comes out a year later. You have lots of links into the C version of the site.
https://www.website.com/file.html
You then need the A urls to 301 to the D URLs (and get rid of the A to C 301s), you need the B URL to 301 to the D URLs and so on. In other words, go through another process of cleaning up the 301s and reducing the hops.
Why do all this. Two reasons. There will still be links to the A, B, C versions of the site. Google will still find them and crawl them and you want to get credit for those links to your site. Also, Google keeps an internal log of URLs and will check them from time to time, even if no one is linking to them. You want Google to find the right URL. In either case, if Google hits a version A URL, it would then have to go to version B via a 301 and then to version C. It can do it, but it would rather have 1 hop.
Side note. Try not to use global 301s, where you just 301 a bunch of pages to the home page. That does nothing for you as far as link equity. Try and make the 301s a 1 to 1 relationship as much as possible.
Take a look at this video and this backs up what I just said. The number of hops is discussed at about 3 min in. The whole video is worth watching https://www.youtube.com/watch?v=r1lVPrYoBkA
-
I'm not sure I understand. What is wrong with the ASP -> PHP redirect?
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
-
My WP website got attack by malware & now my website site:www.example.ca shows about 43000 indexed page in google.
Hi All My wordpress website got attack by malware last week. It affected my index page in google badly. my typical site:example.ca shows about 130 indexed pages on google. Now it shows about 43000 indexed pages. I had my server company tech support scan my site and clean the malware yesterday. But it still shows the same number of indexed page on google. Does anybody had ever experience such situation and how did you fixed it. Looking for help. Thanks FILE HIT LIST:
Technical SEO | | Chophel
{YARA}Spam_PHP_WPVCD_ContentInjection : /home/example/public_html/wp-includes/wp-tmp.php
{YARA}Backdoor_PHP_WPVCD_Deployer : /home/example/public_html/wp-includes/wp-vcd.php
{YARA}Backdoor_PHP_WPVCD_Deployer : /home/example/public_html/wp-content/themes/oceanwp.zip
{YARA}webshell_webshell_cnseay02_1 : /home/example2/public_html/content.php
{YARA}eval_post : /home/example2/public_html/wp-includes/63292236.php
{YARA}webshell_webshell_cnseay02_1 : /home/example3/public_html/content.php
{YARA}eval_post : /home/example4/public_html/wp-admin/28855846.php
{HEX}php.generic.malware.442 : /home/example5/public_html/wp-22.php
{HEX}php.generic.cav7.421 : /home/example5/public_html/SEUN.php
{HEX}php.generic.malware.442 : /home/example5/public_html/Webhook.php0 -
Amp page development issue
Hi everyone currently developing an amp version of my website it validates with no errors, however my <a name="blah"></a>some blah does not work for amp any ideas
Technical SEO | | livingphilosophy0 -
Http to https - Copy Disavow?
If the switch is made from http to https (with 301 redirects from http to https) should the disavow file be copied over in GWT so it is also uploaded against the https as well as the http version?
Technical SEO | | twitime0 -
Which Sitemap to keep - Http or https (or both)
Hi, Just finished upgrading my site to the ssl version (like so many other webmasters now that it may be a ranking factor). FIxed all links, CDN links are now secure, etc and 301 Redirected all pages from http to https. Changed property in Google Analytics from http to https and added https version in Webmaster Tools. So far, so good. Now the question is should I add the https version of the sitemap in the new HTTPS site in webmasters or retain the existing http one? Ideally switching over completely to https version by adding a new sitemap would make more sense as the http version of the sitemap would anyways now be re-directed to HTTPS. But the last thing i can is to get penalized for duplicate content. Could you please suggest as I am still a rookie in this department. If I should add the https sitemap version in the new site, should i delete the old http one or no harm retaining it.
Technical SEO | | ashishb010 -
Should we dump the https from a client site?
We inherited a site that has both http and https. No e-commerce or data transfer...just html. Should we dump the https certificate? I think it might be causing issues with indexing and possible duplicate content. The https site has a certificate warning message...not good. The URL is www.charlottemechanical.com
Technical SEO | | theideapeople0 -
Will it make any difference to SEO on an ecommerce site if they use their SSL certificate (https) across every page
I know that e-commerce sites usually have SSL certificates on their payment pages. A site I have come across is using has the https: prefix to every page on their site. I'm just wondering if this will make any difference to the site in the eyes of Search Engines, and whether it could effect the rankings of the site?
Technical SEO | | Sayers1 -
Websites being hacked & duplicated, what should we do?
Hi, please help! Our website was hacked and being totally duplicated. They even injected codes to intercept our orders. Although the codes issue had been solved, still there're two mirror sites out there. When search for some of our key words, they even have good ranks. What exactly can we do to let Google ban those two sites. Thanks in advance!
Technical SEO | | Squall3150 -
HTTPS attaching to home page
Hi!! Okay - weird tech question. Domain is http://hiphound.com. I have SSL attaching to checkout and my account pages. Tested and works well. Issue - I am able to reach the home page at https://hiphound.com AND http://hiphound.com. If I access the home page via HTTPS and click on a link (any link) then the site is redirected to HTTP again which is good. My concern is the home page displaying via HTTPS and HTTP. Is this is an issue that can be resolved or is it expected behavior I have to live with.? I am being told by DEV there is nothing they can do about it but want to understand why and if they are correct. Thoughts? Thank you!! Lynn
Technical SEO | | hiphound0