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

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.

Related

Redirect Domain to Subdomain using Cloudflare

I'm using a marketing automation platform to build landing pages and those landing pages URLS are automatically published with a subdomain structure, like:
https://subdomain.example.com/mylandingpage
I want to redirect all www and non www visits to the main domain to this landing page that I created, in other words I wish the https://example.com and https://www.example.comto be redirected to https://subdomain.example.com/mylandingpage
Since I'm only using this platform and did not subscribe to any hosting, I'm trying to use Cloudflare to make all this redirects.
I saw a tutorial and this guy said that A entries in my DNS shouldn't be blank and recommended setting them to a reserved IP address, so I set both A entries to 192.0.2.0.
Ok, then I went to page rules and set a 301 redirect to *example.com to be redirected to https://subdomain.example.com/mylandingpage
I can see that when I visit my main domain it's redirected to the subdomain correctly, but the page doesn't load, and I get a too many redirections error. I believe that I made something wrong and it's redirecting everything to the subdomain, even the subdomain is redirecting to itself, even having a page path /mylandingpage after the hostname.
Did I make myself clear? Is there any other way to do what I want?
In Cloudflare page rules instead of *.example.com, please use exact domain match.
URL path we can use wildcard.
www.example.com/* - https://subdomain.example.com/mylandingpage
example.com/* - https://subdomain.example.com/mylandingpage

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

Redirect with cname to subdomain while retaining cname web address

i have this problem where i have a subdomain sub.host.com and a new domain www.new.com. I want to redirect www.new.com to sub.host.com without showing the browser that the url had changed. The content is in sub.host.com but i want that even after the page has fully loaded, it is still showing www.new.com
This means also that when i go to sub.host.com/function, it should also appear as www.new.com/function
The reason is the actual subdomain looks ugly and contains numerics. Is this possible to do? Ive tried searching but all that comes up are only about how to go about creating cname records and none about keeping it intact after redirecting. Thanks
A (reverse proxy) server like Nginx, which is very light-weight, features the url-rewrite rules that you need. IIS7 has also a good url-rewrite engine.

New website on https, do I need to set up 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.

ASP.Net MVC Redirect to WWW domain version

For SEO purposes, I want to do a 301 redirect when anyone hits my domain name without the www. prefix. So, redirect from http://mydomain.com/{page} to http://www.mydomain.com/{page}.
Can I accomplish this with MVC routes? Or should I put some sort of global action filter on every controller?
No doubt you could, but the only reason to do so would be to demonstrate that you could.
In IIS, set up a website for the non www. domain.
Set it to do the redirect, not "to the exact URI" checked, because you want it to match "/{page}" to "/{page}", and also unless you plan to change this policy in the near future "permanent redirect" because unless you plan to change this policy in the near future, then for SEO purposes you do not want to 302, you want to 301.