We are redirecting http and non www versions of our website. Should all versions http (non www version and www version) and https (non www version) should just have 1 redirect to the https www version?
-
We are redirecting http and non www versions of our website. Should all versions http (non www version and www version) and https (non www version) should just have 1 redirect to the https www version?
Thant way all forms of the website are pointing to one version?
-
I am happy I could be of help please let me know if there's anything else I can be of assistance with?
-
PS I will run a crawl to check
-
It is fine to 301 redirect to** "/"** you need to pick forward slash "/" or no forward slash.
- SEE:
- https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html
- https://www.seroundtable.com/google-trailing-slashes-url-24943.html
You should force HTTPS
- http://cardiff.co.uk 301's to http://www.cardiff.co.uk/
- See: https://i.imgur.com/fg34sXR.png
- You should add https
- https://dash.cloudflare.com/sign-up
- or
- https://www.rapidtables.com/web/tools/redirect-generator.html
Add a SSL cert I would just add cloudflare.com (if you want fast & easy also Free)
- https://support.cloudflare.com/hc/en-us/articles/204144518
- https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules
When configuring Page Rules, the Always use HTTPS action is the simplest method to redirect HTTP requests to HTTPS. You can also use the Forwarding URL action with a 301 redirect if you need to redirect to another subdomain in addition to forcing HTTPS. For example, a Page Rule match for
**_http://_cardiff.co.uk_/*_**
with a _Forwarding URL _of
**_https://www.cardiff.co.uk/$1_**
or ASP.NET
<%@ Language="VBScript" %>
<%
' ASP permanent URL redirect - generated by www.rapidtables.com
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "https://www.cardiff.co.uk/"
Response.End
%>Redirect entire domain from HTTP to HTTPS
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Redirect entire domain from non-www to www and HTTP to HTTPS
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Hope this helps,
Tom
-
Thank you for the advice it is very useful.
In GWT we are also showing redirects on all pages from the non / page to the / page
ie cardiff.co.uk redirects to cardiff.co.uk/
is this OK?
-
if you talking about the domain
you should 301 redirect each of the 3 of 4 different URLs to the one you want to be the primary domain that is using https
This is a great guide
https://ahrefs.com/blog/301-redirects/
You can always use CloudFlare as free & easy fix.
If you want to use HSTS preload or just HSTS
Test your 301 setup using
https://hstspreload.org/?domain=example.com
If you are using https://www. as the primary
See you must force http to https and the HTTP://www
Must redirect to the https:// bare domain so that means two redirects.
Error: No redirect from HTTP
http://example.com
does not redirect tohttps://example.com
.Hope this helps,
Tom
-
Ideally, yes.
However, it's not likely to have a massive impact if you do have a redirect chain first to www and then to https.
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
-
Is This 301 redirection correct??
Hello Everyone, I have Added This in .htaccess. Options +FollowSymlinks
Intermediate & Advanced SEO | | falguniinnovative
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule (.*) http://www.domain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.html
RewriteRule ^(.)index.html$ http://www.domain.com/$1 [R=301,L] ErrorDocument 404 /index.html Is this Correct ?? or need any change, please help, thanx in advace .0 -
Https vs Http Link Equity
Hi Guys, So basically have a site which has both HTTPs and HTTP versions of each page. We want to consolidate them due to potential duplicate content issues with the search engines. Most of the HTTP pages naturally have most of the links and more authority then the HTTPs pages since they have been around longer. E.g. the normal http hompage has 50 linking root domains while the https version has 5. So we are a bit concerned of adding a rel canonical tag & telling the search engines that the preferred page is the https page not the http page (where most of the link equity and social signals are). Could there potentially be a ranking loss if we do this, what would be best practice in this case? Thanks, Chris
Intermediate & Advanced SEO | | jayoliverwright0 -
Multiple 301 redirects for a HTTPS URL. Good or bad?
I'm working on an ecommerce website that has a few snags and issues with it's coding. They're using https, and when you access the website through domain.com, theres a 301 redirect to http://www.domain.com and then this, in turn, redirected to https://www.domain.com. Would this have a deterimental effect or is that considered the best way to do it. Have the website redirect to http and then all http access is redirected to the https URL? Thanks
Intermediate & Advanced SEO | | jasondexter0 -
Links to www vs non-www
I was having speed issues when I ran a test under Google Page Speed test and, as a result, switched to using Google Page Speed Service. This meant I had to switch my site from the non-www to the www. Since the switch my page is running faster but my ranking has dropped. What I'm trying to find out is the drop due to all of my previous links going to the non-www or is it because of the site being considered new and is more of a temporary issue. If it is a link issue I will contact everyone I can to see who will update the site address. Thanks everyone!
Intermediate & Advanced SEO | | toddmatthewca0 -
Do I need to set Preferred domain when the non-www redirects to www version?
Hi mozzers, Not sure if I should setup preferred domain when the non www version redirects to the www version? if yes why? Thanks!
Intermediate & Advanced SEO | | Ideas-Money-Art0 -
Redirect a temporary IP
I was performing some development work on a client's site recently under a temporary location on the host's server, for example: http://11.22.33.444/~accountname/folder/page.html Google managed to index a couple of pages using this url 😞 I have updated DNS to the correct domain and the site is live, but I am a bit confused in regards to the correct way to create a 301 Redirect for this example or at least a way point it to our 404 page. I am hoping someone more proficient with htaccess can help me out a bit... Thanks!
Intermediate & Advanced SEO | | SCW0 -
Any way to find which domains are 301 redirected to competitors' websites?
By looking at the work from an SEO collegue it became clear that his weak linkbuilding graph probably is not the cause for his good rankings for a pretty competitive keyword. (also no social mentions where found) I was wondering what it could be, site structure and other on page optimization factors seems to be ok and I don't think there will be exceptionally good or bad user behavior... Finally I looked at the competitors and found that they have more links, better content en better design, so I got a little stuck. The only reason I can think of is that he is doing 301 redirects (or is rel=canonical tags). Is there a way to trace these redirects back to the source in order to include this important variable in your competitor research? thnx
Intermediate & Advanced SEO | | djingel10 -
Non www has 110 links the www has 5 - rankings have gone
A site I'm working on resolves on the non www address and has 100+ links pointing at this address, last month it started to rank and had various phases within the top 50, this month it's totally gone from the search results. The www has 5 links. My questions Which is best? Www or non How do you fix it? Any reason why the rankings have disappeared!? It's a word press site domainname.co.uk = 100+ links www.domainname.co.uk = 5 links
Intermediate & Advanced SEO | | therealmarkhall0