Hello Webmasters of StackExchange and happy holidays!
I signed up an hour ago and have read all the rules for asking questions. I've used StackOverflow for years but this is my first time joining a separate part of the community and network. I am happy to have signed up. But I digress.
I have viewed all other questions that are related to my problem but there is no issue exactly like mine although some are very close. The problem with current question/answers is they simply do not provide a solution for my issue. If I have somehow overlooked one, my apologizes. Please point it out. I will ask my question and give you a brief scenario to help you understand the problem while keeping it all universally relevant to any webmaster.
My Question? How does a webmaster tell search engines to remove any indexed HTTP URLs allowing only the HTTPS protocol to both remain and be indexed later?
What Do I Mean? (The example is a typical scenario for many many webmasters. Scenario is meant to help you understand the prime problem as well as to make it relevant to all webmasters) I have a single page website that was created and indexed in Google. It was ranking in the top 5 spot for my keyword. It was a normal HTTP protocol site:website.com.
In the Google Webmasters tool I claimed/added both versions of the site: and the . (respectfully www and without but as a standard HTTP protocol).
After a few weeks I secured an SSL Certificate and activated it on the domain via my registrar and web host. I then too added both site variants to the Google Webmaster Tool. This time however with the HTTPS protocol. I added and .
I submitted my site to Google for index. The site was indexed that very night and was now in the #1 spot the page/URL was the HTTPS protocol. A clear bump in rank due to the SSL. I checked again a few days later and it was still in the #1 spot but it was the HTTP protocol URL/page that was ranking.
I ran a quick test to verify my suspicions:
site:website.com and two pages where returned rather than just one. A single page site so just one should have returned. I now have in the Google Index two entries of the same page (duplicate content) using separate protocols.
- www.website.com (It is the HTTP version but in Google if it is not HTTPS it will show in the SERPs as seen above without the protocol prefixed to the URL.)
- https://www.website.com (the newly index version.)
How Would A Webmaster Fix This Using SEO And Other Best Practices? (The Actual Goal)
I would like to remove/de-index the HTTP version(s) of the website without hurting my rankings and do so in such a manner that no future HTTP pages are indexed. (This may have made a better title question. >.<)
- Properly, without effecting SEO, de-index the HTTP version of the site from Googles index.
- Using robots.txt, .htaccess, or other best practice, direct search engines to only index HTTPS pages for this domain/website now and in the future.
Thank you! I hope the question is short enough yet holds sufficient enough information that you are able to understand it and that the simple scenario I used (which happens to be the actual case) makes this even more universally helpful to other webmasters. Your answers are gratefully appreciated! I fear I have only a day - 72 hours before Google penalizes me for this as it's already all happened so fast.
I look forward to your answers!