Redirect from https www.domain.com to https www.domain.co.uk - redirect

I would like to ask a question. I had a domain like
(https)www.domain.com
and i transfered the whole domain to
(https)www.domain.co.uk
but i have some seo issues. I want the
(https)www.domain.com/every_url
to redirect to
(https)www.domain.co.uk
I did it for domain.com/every_url to redirect to
(https)domain.co.uk
but if I hit an article from google that has already the https its shows a previous server error. For hosting I use plesk with dedicated server and i used 301 permanent redirect. Does anyone know how to fix this?
Thanks

Related

301 Redirect and HTTPS

OK, please go gentle on me as I am a bit of a beginner when it comes to domains.
My old website was hosted by Squarespace and the Domain provided by GoDaddy and was set up to use SSL (by ticking that option within the Squarespace settings). For this example, let's say the domain was myoldsite.co.uk
This site is now closed down and no longer active on Squarespace.
All of my backlinks over the last 3 years have been created for https://myoldsite.co.uk
Recently, I have created a new Wordpress site again using SSL using the domain name: https://mynewsite.co.uk
Within the GoDaddy admin console for myoldsite.co.uk, I have created a 301 redirect going to https://mynewsite.co.uk
This is working well when I enter http://myoldsite.co.uk, I am forwarded to https://mynewsite.co.uk
However, when I enter https://myoldsite.co.uk, nothing happens and I am not forwarded.
So I have 2 questions:
Is it posible for all old backlinks created using https://myoldsite.co.uk to correctly forward?
By creating the 301 redirect, does this work at the domain level and http / https is not relevant when passing down all the SEO juice?
Thanks in advance,
Duncs

301 redirect for Github Pages and CloudFlare SSL

I am using Github Pages as my hosting site for my domain. The pages are hosted at username.github.io. As per github pages documentation I have put the CNAME file in the root directory pointing to example.com
And in my godaddy DNS manager I have added CNAME www to username.github.io
Later I switched to CloudFlare to use the Universal Free SSL for my Github Custom Domain page.
Currently the CloudFlare DNS Manager includes these two items:
A exmaple.com 192.30.252.153
CNAME www username.github.io
Since I have enabled SSL in cloudfare and redirect http (naked or otherwise) addresses to https, I have put a Page Rule as http://*example.com/* with Always use https turned on.
Now all types of addresses are getting redirected to https://example.com (this is my end requirement)
However the 301 redirection from http://www.example.com to https://example.com is happening this way:
http://www.example.com to
https://www.example.com/ to
http://example.com/ to
https://example.com/
This multiple redirection will affect the site loading speed if a user types the address as www.example.com. And (possibly?) these multiple redirections will affect page ranking in search sites.
Hence is it not better to put direct 301 instead of multiple? Or using multiple redirection is what normally all web-masters do in a situation like this?
If no, then someone please guide me to enable the 301 redirection from http://www.example.com directly to https://example.com/ without any multiple redirections.
You can set Page Rules in CloudFlare and change the order to your intended effect.
If this is still problematic you can also enable HSTS which will require the browser to access the HTTPS version after the first time you visit the site. This also makes the site more secure by not allowing anyone to man-in-the-middle your secure connections.

Redirect HTTPS to HTTP With SSL Certificate Already Removed from CPanel

I want to ask something. I have an online store. My online store uses SSL for the entire website. I also get backlinks with https:// link. Now I do not use SSL again and wish every time people click on the link https will go to http. I've removed the SSL certificate from my CPanel. I've tried several .htaccess and php code, but none of which succeeded. Please help me, thank you. Here's some code I tried:
.htaccess HTTPS to HTTP code: http://pastebin.com/uDuB1S5K
PHP HTTPS to HTTP code: http://pastebin.com/UsDQnB8v
That became my problem is .htaccess and PHP code above always detect website's SSL, I want the code to detect whether the page is opened using the url http or https, not using SSL/not.
Note: The redirect is 301.
Thank you very much for your help.
Regards, Darnin.

Google Webmaster Tools and http vs https

I notice Google recently changed Webmaster Tools to treat http and https as completely different sites - same as www and non-www version of the URL. So I now need to configure and review four separate sites? What a PITA!
They said the do it because we asked for it. I can see how maybe 0.01% of the Internet may use the protocol to separate content on the same URL. But what a pain for the rest of us!
Is there a way to get it to merge all the data as one?
It's recommended to use either www or non-www, but not both. Same with http and https, pick one, use that, and redirect the other. You can find many answers about how to do the redirect. Here are some examples for Apache: redirect non-www to www, redirect www to non-www, redirect http to https and redirect https to http.

Redirect non www requests without redirecting sub-domains

To replace a legacy web site, a client has pointed their DNS at my server where a new version of the website exists.
However they still serve http://support.example.com from their own server.
I have noticed that non-www requests, e.g. http://example.com still point to their own server, therefore show the old web site.
How can I point non-www requests, http://example.com at my server without breaking the functionality of their 'support' sub-domain?
The client's server is a Microsoft server, mine is Linux/Apache
Edit: Changing the DNS 'A' record will not break the existing sub-domain
I know I could add an index.html page to the front of the old site, but if it was ever deleted the page requests would cease to work
I can't use mod-rewrite because I don't have access to their web server files
PROPOSED SOLUTION:
On the client DNS, create an A
record for:
support.example.com – IP of the client's server
example.com – IP of my server
www.example.com - IP of my server
No need for any DNS changes on my server regarding this domain
Changing the A record for example.com won't affect the A record for support.example.com.