Set my blog as my homepage? Redirect? - 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

Related

301 redirect chain in html

I have searched on the internet and on your forum but just cannot find the code to write a chain redirect.
I understand that it is not good practice to redirect more than 3 times but I need to redirect two pages in my website both which have already been redirected once before.
My website is in HTML and I did the previous redirects on the .htaccess file.
I would like to redirect a second time but cannot find how to write this, would it be:
RedirectPermanent /old-page.html http://www.website/folder/new-page.html http://www.website/folder/new-page-two.html
OR
RedirectPermanent /old-page.html http://www.website/folder/new-page.html /folder/new-page-two.html
or do I redirect directly from the original redirected page?
The first redirect was done about three years ago.
I also need to tell Google that some of my webpages do not exist anymore. Can I put a 410 coding on the same .htaccess page or do I need a separate one or do I just delete them and tell Google through my Sitemap.xml?
I would be so grateful for your help with these confusing questions.
Thanks
I understand that it is not good practice to redirect more than 3
times but I need to redirect two pages in my website both which have
already been redirected once before.
It’s not a “bad practice” issue as you are describing. If a user visits /old-page.html how exactly are they going to go to two URLs from that? Is there any site on the Internet you have ever seen that?
I am assuming you want to have two different redirects. Which you can do like this:
RedirectPermanent /old-page.html http://www.website/folder/new-page.html
And then on www.website you do this:
RedirectPermanent /folder/new-page.html /folder/new-page-two.html
I also need to tell Google that some of my webpages do not exist
anymore.
So if you have a page that doesn’t exist, it should return a 404 & Google will know that. So what is the issue? Unless you want to force requests to 404. Then you would do something like this for a page like bad-page.html to 404 on each request:
RewriteEngine on
RewriteRule ^/?bad-page\.html$ - [R=404]
But it seems like you have very simple issues that you are overcomplicating.

Adding more than 1000 301 redirects in drupal site

I am using drupal 6.
I worked on the site revamp for one of our clients and we needed to redirect the old site urls to relevant new site urls so that we do not loose the traffic. I have used path redirect module for same and added some of the urls.
The issue is we have more than 1000 urls to be added and there is no specific pattern (as old site was in asp.) so it would be 1 to 1 mapping for redirect. Adding it in url alias table via path redirect module is something which is hitting the site performance and again it is a manual process.
Is there any other better and optimal solution for this scenerio?
http://drupal.org/project/path_redirect_import
This module has import feature out of the box.
I'm interpreting this question as a question of performance (not a question of the ease of populating many redirects). Please correct me if I've misunderstood your question.
Put redirects in .htaccess
If you're using Apache, then your alternative is to put the redirects directly into your .htaccess configurations. There should be a similar configuration option for this for IIS as well.
This still means that you would have to create the 1 to 1 mapping for each redirect you want, but the redirects are not stored in your database so it saves hits to the db.
Advantages to using Path Redirect module
Note that the Path Redirect module can log when a redirect was last accessed. This statistic/tracking can help you remove redirects that are no longer in use in the long run.
There are posts on the Path Redirect issue queue that suggest that 1000 redirects should not be a problem but every setup is different. You will need to perform your own benchmarking to check the performance of your particular site.

How to do popup on new site for 301 redirected users?

I have just migrated a site to a new domain (with new design) and am redirecting from the old site to the new with .htaccess and redirect 301. Since the new site is quite different, I'm concerned that users might be disoriented. Is there a way to have a popup on the new site that users get only if they have been redirected from the old site? Have been searching on this but keywords seem to lead only to stuff on popup redirects to another site.
I can think of several ways to do it:
Redirect in the 301 to another page (www.blah.com/tour instead of www.blah.com) and there i would put the logic to show the popup
Redirect in the 301 to another page and there set a cookie and redirect to the original page. Then, add logic to the original page to show the popup if the cookie is present (and delete the cookie)
Check the referrer in the new site and if it matches the old one, show the popup
Your problem boils down to detecting a request that has come via a 301 redirect - popups and usability are a separate (simpler?!) issue.
Unfortunately, detecting a 301 redirect is one of those inexact things that requires a mixture of techniques to get near to 100%. I say near, but never quite there - a bit like browser detection.
One option is to append a querystring (GET) parameter to the redirected URL, e.g.
www.example.com/LandingPage.html?isRedirected=true
You could also set the same info in a cookie (but won't work if cookies are disabled or cleared).
Another option is checking the Referrer header - but again, these may differ based on browser implementation and can be faked, although if someone's faking a redirect I don't think you need to worry about guiding them through your new design!

Redirect to a specific page on a DNN site with an extensionless URL

I have a page on my DotNetNuke site and I would like to set up a redirect and was wondering the best way to do it. Here is the problem:
I have a page on the site: mydomain.com/dashbaord.aspx. I would like users to be able to type mydomain.com/dashboard OR mydomain.com/Dashboard and it will redirect them to the /dashboard.aspx page.
I have IIS6, so I set up wildcard mapping, and it seemed to work for /dashboard, but not /Dashboard. Also, I am looking for it to literally redirect you so that /dashbaord.aspx shows up in the address bar. In addition, the wildcard mapping broke some other links on the site, so I was looking for an alternative method to accomplish this. Is there a way that I can set this up through IIS? Or any other way?
Thanks in advance for the help.
In IIS, create a virtual directory by right clicking on Sites, and then call it Dashboard. Then set that to redirect to a specific URL, in your case, http://mydomain.com/dashboard.aspx.

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.