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
-
Domain switch planned - new domain accessible - until the switch: redirect from new to old domain with 307?
Hi there, We are going to switch our local domain oldsite.at to newsite.com in November. As our IT department wants to use the newsite.com already for email traffic till then, the domain newsite.com has to be accessible for public and currently shows the default Apache page without useful content. The old domain has quite some trust, the new domain is a first time registered domain (not known by search engines yet and no published anyhow). The domain was parked till now. I am aware of the steps to take for the switch itself, but: **what to do with the newsite.com domain until everything is prepared for the switch? **I suppose users or search engines find the domain and as there is no useful information available it harms us already. My idea was to 307 redirect newsite.com to the oldsite.at but the concern is that this causes problems as soon as we switch the domain and redirecting with 301 from oldsite.at to newsite.com? Do you have any objections or other recommendations? Thank you a lot in advance.
Intermediate & Advanced SEO | | comicron0 -
Is 1:1 301 redirect required on indexed URL when restructing URL even if the new URL is canonicalized?
Hello folks, We are restructuring some URLS which forms a fair chunk of the content of the domain.
Intermediate & Advanced SEO | | HB17
These content are auto generated rather than manually created unlike other parts of the website. The same content is currently accessible from two URLs: /used-books/autobiography-a-long-walk-to-freedom-isbn
/autobiography/used-books/a-long-walk-to-freedom-isbn The URL 1 uses the URL 2 as the canonical url and it has worked allright since Moz does
not show the two as duplicate of each other. Google has also indexed the canonical URL although
there is still a few 'URL 1s' which were indexed before the canonical was implemented. The updated URL structure will look like something like this: /used-books/autobiography-a-long-walk-to-freedom-author-name-isbn
/autobiography/used-books/a-long-walk-to-freedom-authore-name-isbn It would be great to have just a single URL but a few business requirement prevents
us from having just the canonical URL only even with the new structure. Since we will still have two URLs to access the same content and we were wondering
whether we will need to do a 1:1 301 redirect on the current URLs or since there will be canonical URL
(/autobiography/used-books/a-long-walk-to-freedom-authore-name-isbn),
we won't need to worry about doing the 1:1 redirect on the the indexed content? Please note that the content will still be accessible from the OLD URL (unless 301ed of course). If it is advisable to do a 1:1 301 redirect this is what we intend to do: /used-books/autobiography-a-long-walk-to-freedom-isbn 301 to
/used-books/autobiography-a-long-walk-to-freedom-author-name-isbn /autobiography/used-books/a-long-walk-to-freedom-isbn 301 to
/autobiography/used-books/a-long-walk-to-freedom-authore-name-isbn Any advice/suggestions would be greated appreciated. Thank you.0 -
GTM Migration from Old to New Verison as Old Version closing on 1st April
Hi Guys, Can you please tell me is it a correct configuration for tracking thank you page? In Old Version of Tag Manager - GA conversion Tracking, tag type - universal analytic, web property id - UA-12345678-9
Intermediate & Advanced SEO | | devdan
track type - transaction, Firing rule -{{url}} contains ordersuccessful.aspx, {{event}} equals gtm.dom In New Version of Tag Manager - Choose Product - Google Analytic, choose tag type - universal analytic, configure tag - tracking id - UA-12345678-9, track type - transaction, Fire on -Name - order successful page, type - custom event, Filter- Page url contains ordersuccessful.aspx, event equals gtm.dom If i remove event equals gtm.dom will tag fire and transaction details will reflect in google analytic? I am doing Manually configuration in new version of GTM as i have only few tags so just want to know if all tags successfully configured & I placed new GTM code on my website then google analytic will start reflecting data at same moment right, it will not take 24 hours right? Thanks! Dev0 -
Do I redirect pages that no longer appear on the website?
Here is an example of the link that is no longer on the website (Broken link) http://www.weddingrings.com/item.cfm?str_shortdesc=UNIQUE The broken link was fixed to : http://www.weddingrings.com/item.cfm?str_shortdesc=UNIQUE CARRE CUT DIAMOND ETERNITY BAND&str_category=Diamond-Bands-and-Gold-Rings&grouping_id=9&category_id=21&int_item_id=6884 Would I still need to redirect the old broken link to the new fixed one using 301 redirect?
Intermediate & Advanced SEO | | alexkatalkin0 -
Differences between "casas rusticas" and "casas rústicas"
Hi All, I've a client with this website: http://www.e-rustica.com/casas-rusticas It's a spanish realtor for special houses (rustic). We wanto it to be good posited as "casas rústicas" that it's the correct keyword and asl "casas rusticas" that it's like lot of people write it. Do you know if google see this two keywords as the same? Even we've done SEO for "casas rústicas" it's much better posited for "casas rusticas". Regards,
Intermediate & Advanced SEO | | lbenzo_aficiona0 -
Indexed non existent pages, problem appeared after we 301d the url/index to the url.
I recently read that if a site has 2 pages that are live such as: http://www.url.com/index and http://www.url.com/ will come up as duplicate if they are both live... I read that it's best to 301 redirect the http://www.url.com/index and http://www.url.com/. I read that this helps avoid duplicate content and keep all the link juice on one page. We did the 301 for one of our clients and we got about 20,000 errors that did not exist. The errors are of pages that are indexed but do not exist on the server. We are assuming that these indexed (nonexistent) pages are somehow linked to the http://www.url.com/index The links are showing 200 OK. We took off the 301 redirect from the http://www.url.com/index page however now we still have 2 exaact pages, www.url.com/index and http://www.url.com/. What is the best way to solve this issue?
Intermediate & Advanced SEO | | Bryan_Loconto0 -
URL rewriting with "-" or with a space ?
Hi Which url should i use for my web site ? and why ? 1 : http://www.test.com/how-are-you.html 2 : http://www.test.com/how are you.html thanks
Intermediate & Advanced SEO | | nipponx0