Forum Moderators: phranque

Message Too Old, No Replies

HTTPS migration questions

         

jediviper

1:49 pm on Aug 5, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



Mods Note - this thread was split out from an ongoing thread at: [webmasterworld.com...]
This quote is the relevant part of that discussion:
I created in January a specific sitemap file for the non-HTTPS property, with 300,000+ URLs ('http://example.com/whatever', not 'https://example.com/whatever'), in order to make Google crawl the HTTP URLs and, after seeing that they were 301-redirected, remove them from the crawling list. But Googlebot is still crawling the HTTP URLs and even considering them as "duplicate".



So what is the suggested way of moving forward with such situation?
Creating a 301 redirect for each http link towards the https version?

[edited by: not2easy at 1:15 pm (utc) on Aug 6, 2020]
[edit reason] split/move intro [/edit]

not2easy

3:00 pm on Aug 5, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



@jediviper - yes, each old URL should land on the new page for that old URL without forcing the visitor to start over at the home page. Redirecting everything to the new homepage URL is a bad practice and Google considers it as 'Soft 404' which is worse that a plain old 404 because it is a bad user experience. If done properly the new site should maintain the same URL structure and your redirect should land them on the page they clicked on with the old http: URL.

There are thousands of how to discussions in the Apache [webmasterworld.com] forum here and a site search (upper right on desktop) for something like
to https:
or one of the rules like
RewriteCond %{HTTPS} !on
and you can learn both how and why.

NickMNS

4:29 pm on Aug 5, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@jediviper
Creating a 301 redirect for each http link towards the https version?

No. To be explicit, one needs to create one rule to redirect any http request to it's equivalent https location. As described above by not2easy, there are many ways to do this.

lucy24

5:33 pm on Aug 5, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Creating a 301 redirect for each http link towards the https version?
Yes, but that doesn’t mean you need to write out a separate rule for every page on the site! Make a single rule that captures the request and redirects to the HTTPS version of the same request.

Edit: You may need to clarify what you mean by “link”. Your site-internal links should in any case start with / for root, so the protocol will be the same by default. (There is also the // syntax but this is really only meaningful for search engines and similar robots; human browsers will keep the same protocol anyway.)

jediviper

10:46 am on Aug 6, 2020 (gmt 0)

5+ Year Member Top Contributors Of The Month



It's good that all opinions agree on the redirect part.
I was also curious if someone would propose some canonical method.

not2easy

1:48 pm on Aug 6, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I was also curious if someone would propose some canonical method.
If you can clarify your use of 'canonical' as to whether it relates to the domain canonicalization that is typically handled in rewrite rules or whether it relates to canonical meta data that relates otherwise duplicate pages at various URLs to the preferred version - such as is common in WordPress - then we can offer suggestions.