New website on https, do I need to set up redirect? - redirect

We have an e-commerce website with in 4 languages running on ourbrand.com, ourbrand.de, ourbrand.fr etc. Currently 3 of those are running on http and the last one we are just ready to launch will be on https. I am trying to figure out if and how I need to set up htaccess redirect.
There is no history of running this new website on http (so no need to redirect existing http traffic), but I am sure that some people will type ourbrand.it or www.ourbrand.it directly to their browser's address bar. As far as I know, browser will default it to http://ourbrand.it right? So do I need to set up redirect to https? Which one? 301? Thank you.

Yes, because as you said, if your visitors type ourbrand.it the browser will default to http://ourbrand.it
The best thing to do is a 301 (permamant) redirect.
If you want to improve security and avoid that first redirect, your should look into HSTS and HSTS preload.

Related

ColdFusion route redirects

Is there a way using ColdFusion to have a one page that can route url redirects? I have a bunch of one off page redirects and it is really weighting down my Git commands.
So Like:
abc/index
test/index
redirect/index
etc...
So I'm trying to figure out a way to move these all to one app that can route them to the correct redirect. Doing this on the server is not an option for me as our server admin has a lockdown on access.
the best is to have URL rewrites at the server level.
However, you can you use onRequestStart function in your Application.cfc and match the page being called and redirect accordingly.
Basically, have some logic added in the onRequestStart according to your needs.

How to check my page is from 302 redirect?

I found that anybody show their page to user, then 302 redirect to my site,
I want stop it.
I thought there would be referer in request header, but didn't!
I tested this in chrome72.0.3626.121 and ie11, and use fiddler to catch Request,
there have no referer header in all request.
And my server side code can't see referer too.
How can I stop 302 redirect to my site??
It's possible these days for sites to disable adding a referrer when a user follows a link. This is a privacy feature.
The result of sites using this feature is that you can't tell if:
A) A user opened your site directly from the addressbar
B) A user came to your site from somewhere else.
If you could tell the difference, it means the privacy feature is not working. Your only option is to block anyone with no referrer header, but then you might block a lot of other users as well.
There is one other common reason for this though, if you are running an insecure (http) site and you are being linked from secure (https://) site. It might be possible to get the referrer back in this case by upgrading your site to https.

Set my blog as my homepage? Redirect?

When I first started my website, I had a home/landing page and I installed my blog at myurl.com/blog. I no longer need that homepage and am wondering if there is a way to set myurl.com/blog as my homepage? So if someone types in myurl.com, it will automatically go to myurl.com/blog.
I'd like to avoid any "click here to be redirected" or "you'll be redirected in 10 seconds" type of thing.
There are likely multiple approaches, depending on your setup, but IF your setup qualifies (linux hosting etc) then a simple .htaccess permanent redirect would be the simplest approach:
# Permanent URL redirect
Redirect 301 /blog myurl.com

HTTPS iframe in HTTP page, browser false warnings

I have a facebook tab which is setup with a typical html form, that utilizes mod_rewrite to default to HTTPS because of sensitive data.
When a facebook user (without secured browsing) hits it with HTTP protocol, FF 23 and IE 10.0.9 throw error saying there is a protocol mismatch between the url and iframe(facebook tab). I think this feature was created to catch HTTPS pages with HTTP content on them, but in this case it's the opposite. These browsers don't care. The user has to "opt-in" to allow the rest of the site to load, making the user experience less than enjoyable, mostly because it kills some javascript.
Has anyone experienced this issue. If yes, what was your solution.
Thank you.
Same Origin Policy as specified in RFC 6454 Subsection 3.2 covers the protocol, host, and domain.
Iow: Sorry, it's as designed.

Will re-direction from home page affect search engine crawling?

There is a new domain, let's say va.in.
Content is being prepared for the sub-domain a.va.in
The idea is that va.in/index could contain pointers to various sections sometime in future (e.g. b.va.in, c.va.in etc.). As of now, it does not make sense to have such a page as there is just one section i.e. a.va.in
If I decide to re-direct va.in to a.va.in for now, will the search engines follow the re-direct and index the site?
Is DNS the best place to do the re-direction?
Using "301 Moved Permanently" search engine will only index sub-domain a.va.in.
If that's ok, you can do this using web server's config.
For example in Apache:
<VirtualHost va.in www.va.in>
Redirect permanent / http://a.va.in/
</VirtualHost>
You can't really use DNS to do redirect, because in DNS you cannot assign CNAME to #.
See: Is Root domain CNAME to other domain allowed by DNS RFC?
There is question related to yours: 301 Redirect vs DNS change: Is it ever safe to kill a 301 redirect and update the DNS for a subdomain?
Yes, the search engines follow redirects, if you redirect with a HTTP header
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$location);
I don't know about DNS redirect, but I'd rather not use it..
You can read more about how to do a HTTP redirect here.
You can redirect in two ways.
Programaticlally as evilpenguin said
Using the webserver (Example iis)
But there is one thing common in both these options. The redirect must be permanent redirect if you want to inform search engines that va.in is permanently moved to a.va.in
If you dont specity permanent redirects, still crawlers will go to a.va.in but in this case they wont be notified that it is a permanet redirect.
If some one has bookmarked va.in and in the first case (permanent redirection) bookmarks will get updated. But in the second case book marks wont be updated.
Hope this helps.