Redirect old "not found" url (at http) to new corresponding page (now at https)
-
My least favorite part of SEO
I'm trying to redirect an old url that no longer exists to our new website that is built with https.
The old url: http://www.thinworks.com/palm-beach-gardens-team/
New url: https://www.thinworks.com/palm-beach-gardens/
This isn't working with my standard process of the quick redirection plugin in WP or through htaccess because the old site url is at http and not https.
Any help would be much appreciated! How do I accomplish this, where do I do it and what's the code I'd use?
Thank you Moz community!
Ricky
-
Hey Avin,
Don't worry about it anymore. I flipped my personal site running WordPress over to SSL last month and I'll tell you everything I did to make it work. Thomas mentioned, "you should be forcing HTTPS", and he's right but what the Yoast plugin lacks in forcing an HTTPS redirect, you can achieve with a WordPress Plugin.
If you want to see it working for my site, just go to http://www.kingrosales.com and watch it work
Here's what I did:
1. Install the WordPress HTTPS plugin. I found another plugin before this one called, HTTPS Redirection, but it didn't do the job.
2. One of the thinks that you will also need to do is change all the hardcoded links to images within your content that may be calling the http version. If you don't, any images or embedded content from your site will cause the browser show that your site is trying to be https but some components are not, so you're gonna get a caution sign over the padlock.
You can do one of two things to fix all these hard coded links to content within your site:
- Go through each page and post and change the img src to the https version.
- Open phpmyadmin and go run an SQL query to find and replace http with https.
In the Yoast SEO plugin, check the Edit Files area so you can check the htaccess file. In mine, it looks like eventhough I disabled the HTTPS Redirection plugin, it has some lines in there placed above all the other rules:
BEGIN HTTPS Redirection Plugin
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]</ifmodule>END HTTPS Redirection Plugin
3. Lastly, install the Redirection plugin by John Godley so you can manage any other 301 redirects manually. Its an awesome tool and I wish I had installed this a long time ago. It has a log of all 404 and then you can just click the "Add Redirection" and when you scroll to the bottom (because nothing appears to happen when you click it), it will give you a form where you just have to put the URL of the new slug.
I hope it helps!
-
Along with Redirection I think the Yoast WordPress SEO premium plug-in is probably the best redirection and search plug-in for WordPress.
One thing I wanted to let you know is that you are showing HTTPS you should be forcing HTTPS though I do not believe it has anything to do with this particular issue.
Add the following redirect to the the top of your .htaccess file:
RedirectMatch 301 ^/palm-beach-gardens/$ https://www.thinworks.com/palm-beach-gardens-team/?p=$
You may need to implement force HTTPS
Use https://wordpress.org/plugins/wp-force-https/
of course depending on your hosting provider and other factors you can do one better and implement it in this method
sincerely,
Thomas
-
I use the Yoast SEO plugin. It has a great utility for redirects. It's only in the paid version though. It's worth the $ but it's not cheap. $89
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
-
Redirect chains from switch to HTTPS
Hi, We have a client who recently switched their site to https:// The rule to force redirect non-secure URLs to https is in their .htaccess file: RewriteEngine on if non-SSL and one of these, redirect to SSL RewriteCond %{HTTPS} !on
Intermediate & Advanced SEO | | roundabout
RewriteRule ^(.*)$ https://www.clientdomain.com/$1 [R=301,L] However, they also have simple redirects below this rule that redirect one page to another, such as: Redirect 301 /old.php https://www.clientdomain.com/new.php This is causing redirect chains like this: (A) http://www.clientdomain.com/old.php > (B) https://www.clientdomain.com/old.php > (C) https://www.clientdomain.com/new.php Is there any way to rewrite the rules in .htaccess to get rid of these redirect chains? So that URL A goes directly to URL C? Thank you!1 -
HTTP URL hangover after move to HTTPS
A clients site was moved to https recently. It's a small site with only 6 pages. One of the pages is to advertise an emergency service. HTTPS move worked fine. Submitted https to webmaster tools, submitted sitemap. 301 redirects. Rankings preserved. However, a few weeks later doing the site:example.com there are two pages for the emergency service. One says https the other is http. But the http one says the correct SEO title and the https one says an old SEO title. This wasn't expected. When you click the HTTP URL link it 301 redirects to the HTTPS url and the correct SEO title is displayed in the browser tab. When you click the HTTPS url link it returns a 200 and the correct SEO title is shown as expected in the browser tab. Anyone have any idea what is going on? And how to fix? Need to get rid of the HTTP URL but in the site search it contains the correct title. Plus- why is it there anyway?
Intermediate & Advanced SEO | | AL123al0 -
Any idea why Google Search Console stopped showing "Internal Links" and "Links to your site"
Our default eCommerce property (https://www.pure-elegance.com) used to show several dozen External Links and several thousand Internal Links on Google Search Console. As of this Friday both those links are showing "No Data Available". I checked other related properties (https://pure-elegance.com, http:pure-elegance.com and http://www.pure-elegance.com) and all of them are showing the same. Our other statistics (like Search Analytics etc.) remain unchanged. Any idea what might have caused this and how to resolve this?
Intermediate & Advanced SEO | | SudipG0 -
301 redirect to search results page?
Hi - we just launched our redesigned website. On the previous site, we had multiple .html pages that contained links to supporting pdf documentation. On this new site, we no longer have those .html landing pages containing the links. The question came up, should we do a search on our site to gather a single link that contains all pdf links from the previous site, and set up a redirect? It's my understanding that you wouldn't want google to index a search results page on your website. Example: old site had the link http://www.oldsite.com/technical-documents.html new site, to see those same links would be like: http://www.newsite.com/resources/search?View+Results=&f[]=categories%3A196
Intermediate & Advanced SEO | | Jenny10 -
Url rewrite & 301 redirects
Hi all I am having some issues rearding url rewrites and 301 redirects with 1 and 1 hosting and am unsure of the best approach. The website is a custom made shopping cart system with categories and products. The current urls for categories are : index.php?l=product_list&c=1 The new url format required is : /banner-stands The current urls for products are : index.php?l=product_detail&c=1&p=1 The new url format required is : /banner-stands/banner-stand Thanks
Intermediate & Advanced SEO | | vividwebdesign0 -
New Website Look/Structure - Should I Redirect or Update Pages w/ Quality Inbound Links
This questing is regarding an ecommerce website that I hand wrote(html) in 1997. One of the first click and buy websites, with cart/admin system that I also developed. After all this time, the Old plain HTML look just doesnt cut it. I just updated to XHTML w/ a very modern look, and believe the structured data will index better. All products and current category pages will have the identical vrls taken from the old version. I decided to go with the switch after manual penalty, which has since been removed... I figured now is the time to update. My big question is that over the years, a lot of my backlinks came from products/news that are either no longer relevant or just not available. The pages do exist, but can only be found from the Outbound Link Source. For SEO purposes, I have thought a few things I can do but can't decide which one is the best choice. Any Insight or suggestions would be Awesome! 1. Redirect the old link to the most relevant page in my current catalog. 2. Add my new header/footer to old page(this will add a navigation bar w/ brands/cats/etc) 3. Simply add a nice new image to the top of these pages linking home & update any broken/irrelevant links. I was also considering adding just the very top 2 inches of my header(logo,search box, phone, address) *note, some of these pages do receive some traffic. Nothing huge, but consider the 50+ pages, it ads up.
Intermediate & Advanced SEO | | Southbay_Carnivorous_Plants0 -
Are 17000+ Not Found (404) Pages OK?
Very soon, our website will go a rapid change which would result in us removing 95% or more old pages (Right now, our site has around 18000 pages indexed). It's changing into something different (B2B from B2C) and hence our site design, content etc would change. Even our blog section would have more than 90% of the content removed. What would be the ideal scenario be? Remove all pages and let those links be 404 pages Remove all pages and 301 redirect them to the home page Remove all unwanted pages and 301 redirect them to a separate page explaining the change (Although it wouldn't be that relevant since our audience has completely changed)- I doubt it would be ideal since at some point, we'd need ot remove this page as well and again do another redirection
Intermediate & Advanced SEO | | jombay0 -
Is 301 redirect suggested on pagination pages
Hi - Due to pagination the default page of site is coming in 2 url with - ?page=1/ sub-url and /sub-url is 301 a recommended solution due to this pagination urls Also - is it required to create separate title and meta description of every pagination page We are taking specifically in context of our discounts and offer section http://www.mycarhelpline.com/index.php?option=com_offers&view=list&Itemid=9
Intermediate & Advanced SEO | | Modi0