redirects issue in wordpress multisite - wordpress

Recently I configured my website for https and redirected http to https but now in google page speed, I am getting issue of Too many redirects!
Can be checked at: https://developers.google.com/speed/pagespeed/insights/?url=peterkentconsulting.com&tab=desktop
And Google explains: Your page has 2 redirects, site is wordpress multisite. Please help me to remove those redirects..
Thanks

Your http to https redirect is not working fine. You should configure all urls:
http://peterkentconsulting.com/
http://www.peterkentconsulting.com/
http://www.peterkentconsulting.com/index.php
to
https://www.peterkentconsulting.com/
Now as I see your site's all requests are first going to /index.php which wordpress redirects to / in its .htaccess.
You should directly redirect http://www.peterkentconsulting.com/ to https://www.peterkentconsulting.com/

solved by editing site url at wp_site and wp_options tables in database.

Related

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.

301 and HTTPS redirect to root via htaccess

I moved domain from http to https. And currently all http urls are redirected to https.
But there are some broken links from old urls such as http://domain.tld/url-link-broken and I would like to redirect them to the root domain.
The problem is that currently http://domain.tld/url-link-broken redirects to https://domain.tld/url-link-broken
How can I change this via htaccess so that if url is broken it would not only redirect to https but also to the root?
Check following things first
Your console gives any error there regarding resources
Check do you have static links in menu or anywhere else
Check your home_url and site_url in admin
Solution
Using Plugin:
Please Take Backup of database before proceed
https://wordpress.org/plugins/ssl-insecure-content-fixer/
For More Information :
https://managewp.com/wordpress-ssl-settings-and-how-to-resolve-mixed-content-warnings

301 redirect in htaccess not working as expected

I am trying to add a simple 301 redirect to a website's htaccess, but no redirection is occurring, nor am I encountering any errors--can anyone shed some light? The redirect would redirect people visiting an old blog post to a new page:
old blog post: https://www.horizonhomes-samui.com/horizon-homes-construction/
new page: https://www.horizonhomes-samui.com/construction/
The redirect code I'm using is:
Redirect 301 /horizon-homes-construction/ https://www.horizonhomes-samui.com/construction/
Possibly Relevant Info
My site is a Wordpress site.
I also tried adding a "RewriteEngine On" line to the top, but that did not resolve the issue.
The htaccess file I'm editing is located in my WordPress root directory (along with wp-content, wp-admin, index.php, etc).
The instructions I'm following for adding the 301 redirect are from this guide.
Thanks.
When you don't have a lot of control over the server, which is the case for a lot of wordpress sites, a plugin is better than trying to update the .htaccess file.
I am sure there are a lot of good plugins that do this. This one has worked for us.
https://wordpress.org/plugins/redirection/
With the help of my server admin, I ascertained why this 301 redirect was not working. It is because my site is on an Nginx server, so any redirects added to htaccess will not be read by the server. My server admin was able to add the redirects properly.

Wordpress permalink and HTTPS

I installed HTTPS on my website in WordPress . I use CloudFlare for it and I made changes to the URL in WordPress administration and the CloudFlare plugins etc.
screenshot of home page modification
My concern is the following I have HTTPS in my WordPress general settings . I have HTTPS in the permalinks confirmation page.
Only once editing a page or a project under the title permiliens the portfolio is in HTTP ...
I do not understand why it does not go into HTTPS ( for doing so on other sites I do not remember such a problem).
Can you help me?
First of all make sure that your site is only opening up with https and not with http and https.
In the WP general settings wordpress and site name should start with https
Then logout and then login back to wordpress admin. Post that your permalinks should start displaying as https. Also you need to change the internal links to https manually.
Let me know if that fixed the issue. I had similar problems with my site, for which i moved to https just yesterday. Also let me know if you did anything extra for your site.

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.

Resources