CloudFront + CloudFlare + Wordpress getting 302 redirects - wordpress

I just implemented CloudFront with Wordpress using W3TC. But none of my images are using the CDN. On checking Pingdom report I found that there is a redirection happening where CloudFront redirects back to my website.
Remove the following redirect chain if possible:
https://cdn.fashioncrab.com/wp-content/uploads/2016/05/secure-footer-widget1.png
https://www.fashioncrab.com/wp-content/uploads/2016/05/secure-footer-widget1.png
Here is the PingDom report https://tools.pingdom.com/#!/vDTT0/https://www.fashioncrab.com/
How to fix this so that my images are called from CloudFront instead of my server.
Note: I have made the CNAME record for cdn.fashioncrab.com in CloudFlare if that helps...

So finally I am able to resolve it myself.
Here is what I did:
Got rid of CloudFlare. Surprisingly, the site is much faster without CloudFlare
Removed "Enable 301 .htaccess redirect" option from Really simple SSL wordpress plugin
got a Free SSL certificate issued for the CloudFront distribution from AWS
Now everything is working as it should.

Related

How to turn WP https site to http (from secured to non-secured)

I have a simple WP blog that doesn't need https.
My host was offering a free SSL certificate so I took that up.
It's only after that I read that turning a site to https is like having a brand new site and therefore starting SEO all over again.
I've recently moved host and had to use the backups I made to move the content across. I've found out all the internal links on the site are https, probably because the site was secured at the time of making the backup. Unfortunately the browser says my https pages are not secured despite an SSL certificate that seems installed.
Rather than resolving that, I think I will benefit more by turning my site back to http. All my backlinks over the years point to http. So how do I convert all internal links that point to https pages back to http?
All the resources I find online are to turn http to https.
Database
You need to change the site and home urls in the database table wp_options to the url without https.
Links
Then use a plugin to change the media links and anything using your https url to the http url, I recommend Velvet Blues here wordpress.org/plugins/velvet-blues-update-urls
Redirection
You also need to redirect all your https urls to the http one, you can use this plugin wordpress.org/plugins/redirection. As Google and other search engines have indexed https for your site.
Permalinks
You can also try update your permalinks in General > Permalinks and just resave it.

Wordpress Subdomain sites redirect to main site

We use wordpress and our subdomain sites recently started redirecting to our main site.
Exmaple, sub.example.com/products redirects to https://example.com/products and gets a 404.
I did notice if I add https:// in front of the subdomain it goes to the proper subdomain site. What would cause that? How would I fix that issue? I want the user to be able to put sub.example.com and get the proper site without needing to type in the https part.
The only thing that I remember changing recently was adding the ssl certificate.
Thanks!
I recently experienced this issue. Check for any wordpress plugins forcing HTTPs on any http domains. Or anything on your subdomain forcing https when it isn't an https site.

Cloudflare 525 over Wordpress with HTTPS

I am getting a Cloudflare error 525 in my Wordpress.
I'm working on a subdomain where the domain has https that work fine through cloudflare but the subdomain does not.
Hosting: Godaddy
The SSL certificate is UCC bought from Godaddy.
Crypto SSL in Cloudflare: FULL
I made all the changes in Wordpress mainly following these steps: force https pages wordpress
And all URLs are changed from http:// to https://.
Can anyone help me, I'm running out of ideas and I do not know what else I should do?
That error indicates that the ssl handshake is failing on the subdomain. The subdomain might be configured differently at a web-server level, or there may be Page Rules that change the behavior
https://support.cloudflare.com/hc/en-us/articles/200278659-Error-525-SSL-handshake-failed
In case someone still get this error, here is how I fixed it.
This was driving me crazy because the site was working fine and then the error started to manifest intermittently: error page shows, then by refreshing a couple of times the site loaded but with some missing images. So it was a mess.
Tried to reach out for godaddy support but it was not very useful. They checked the files, database, open ports and even changed the propagating DNS, but still the error was persisting.
At the end I tried:
Disable my ssl plugin in wordpress (really simple SSL)
Go back to http setting
In cloudflare, set the SSL setting to flexible
I found out that Cloudflare takes over the writing of the https links, so the plugin was creating a redirect loop and that was causing the handshake to fail.

HTTPS to HTTP redirect via .htaccess

I have a website hosted on a GoDaddy wordpress hosting. We had an SSL, but not longer have the SSL. Google archive some pages with the SSL so I just want to redirect https requests to the http version of the sit.e I have access to the .htaccess file so I figured that was the best way to do it.
I have been searching around and tried tons of different .htaccess redirects, but none of them are working. Including this https to http 301 redirect via htaccess. I know the htaccess is functioning because wordpress is working and I added a few test redirects to it and they worked as well.
Any thoughts or suggestions would be much appreciated.
Thanks.
Wordpress has its own redirect procedure.
Check in the General Settings of you WP Panel for the WordPress Address and the Site Address fields. Make sure they both are non ssl absolute paths.
Another thing to check is on the wp-config.php
define('FORCE_SSL_ADMIN', true);
That could have been added by another plugin. Remove it or make it false.
One last thing you could try (not the best option) is to ask google to remove those specific links, here's a reference for that.
I hope this helps.

http https dupliacte content google

I recently installed an SSL cert on one of my sites. I have noticed that Google has now indexed both the http and https version of each page. I haven't really noticed any problem ranking wise so far, but I am conscious that a problem may occur with duplicate content.
How can I overcome this? Only a few of my pages will be using https, most of the pages on the site will be best served with just http, in fact I could get away with not using https pages at all for the time being if necessary.
A few ideas I have come across are: 301 redirects, redirect all https to http with .htaccess.
Robots.txt for the ssl pages , again using .htaccess. The problem here is that the https pages have already been indexed and I would like them to be deindexed. I am not sure if robots.txt would be sufficient because as far as I am aware robots.txt will just tell a bot not to crawl the page, but it has already been indexed.
Is there any other suggestions?
Use canonical URLs for this.
As i have already faced this problem ,Good solution will be cannonical link
Google will remove your indexd https page after some time (takes week to month ).For those page where you can't put cannonical link give 301 redirect from https to http .

Resources