Apache / Google undo 301 redirect - apache

I did something stupid a couple of days ago :)
The was a hacker attack on a server where I had a clients website hosted.
Long story short, some files were deleted and I had to rebuild it.
In the meantime, I copied a snippet of the code I found on stackoverflow.com to redirect everybody that came to that domain to another clients domain (with another similar website).
I didn't notice that the code I copied was 301 permanent redirect...
So I'm guessing, the redirect is cached in users browsers and can't be cleared out.
But what about google?
I'm guessing google will fround upon this mistake and give the domain a penalty of some sort.. Or maybe just remove the content from the search results...
Is there a way to resolve this so google is affected as less as possible?
Thanks!

Unfortunately, Google will translate your old page rankings over to the temporary redirect because they were 301's. You can't go and tell them how to index the internet, but you can create similar 301 redirects from the temporary site to the new permanent site and that should preserve most of your Google juice.

Related

Old urls match new urls of site

guys i have one old site which is in joomla (that is not important). The site has unfriendly urls with too munch get parameters. Example of the urls:
http://example.com/index.php?option=com_content&task=view&id=1088&Itemid=245
So we will rebuild this site on custom our platform. The site have too munch urls in forums and so on.
So basicaly we want when you got from the old urls on the site to be redirected to the new post or whatever it is.
Solution what i have think that it will work.
Every article/post have a old url field in the database and you match the new address with the old address.
You have a panel in the admin area Generate htaccess and when you generate htaccess from the admin it get the old htaccess get all matched urls (old/new) and recreate it.
The think is that i have never do this and i don't know what problems could have the system after this.
Anyone who faced this kind of challenge?

htaccess 301 redirect - how to disable it?

I have added 301 redirect on my website by mistake (because I was doing maintenance). Now lots of people can't get back to my website, because they are still redirected to other page - eventhough I removed redirection (even deleted htaccess). As much as I searched around it's because htaccess (or 301 redirect) is cached in users browser and I wasn't able to find any solution for this. Is there any way to fix this, I can't just loose hundreds of visitors because of something like this?
This page explains what is going on in good detail:
301 Redirects: The Horror That Cannot Be Uncached
Basically, modern browsers cache the redirect response for 301 for some indeterminate amount of time and will not make an updated request to your old web page to refresh it. Users can manually clear the cache and, because it is a cache, data can be purged if the browser needs more space for other data (like other redirects).
This SuperUser question resolves the caching issue from the client's end:
How can I make Chrome stop caching redirects?
One interesting answer is:
//superuser.com/a/660522/178910
In this answer, the user points out that the browser treats http://example.com/ and http://example.com/? as two different URLs. You could go to the "new" site and setup an HTTP 302 redirect pointing back to the original page with a ? on the end and it should load. If they original page already had a query as part of the URL, you can simple add an & to the end to achieve the same result.
It's not perfect -- it is a different URL after all -- but at least they'll be able to view your old site.
Note that your web application may try to redirect empty queries or invalid queries back to a "clean" page, which you may have to disable to get the intended result.
UPDATE
One other option is to put a redirect from the new site back to the old site (make this a 302 or 307 redirect to avoid the 301 problem you're currently having). From my testing, Chrome will remove the old redirect when it does this. It may throw a "redirect loop" error, but only once. I was unable to reproduce the cached redirect problem at all with the latest version of Firefox. Other browsers' behavior is probably going to be inconsistent.

Removing Hacked URL Strings From Google

I recently suffered a hack on a number of websites which were hosted on the same server. I've identified and removed the source of the hack, and used Patrick Altoft's smart Google Alerts idea to monitor for further attempts.
I've then logged into Google webmaster tools, asked to be re-evaluated post hack, and I've also re-submitted site maps to speed up a re-crawl.
However I would like to remove the infected url's from Google, and was thinking the best way to speed up this process would be to use .htaccess to return a 404 error, whenever a page with a specific string variable appeared.
Is this possible with a .htaccess file, or is there a better course of action to take?
You can see the damage done here.
Thanks for any help and suggestions.
404 will work, but is possible not the best solution. A better solution would be 301: moved permanently, or 410: gone.
A 404 tells you that a page is missing, but not why. Google may keep these urls for a while to investigate later whether they exist again. By using 301 or 410, you explicitly tell Google that that url is not going to be fixed.
410 is the better option, but I'm not sure if this is possible from htaccess, athough you could 301 to a php-file that returns a 410 header.
Addition: Here's an article about redirecting using the '410, Gone' header with .htaccess. http://diveintomark.org/archives/2003/03/27/http_error_410_gone
Yep, give them 404/410/301 status code, then Google will remove them in a day or two. I've done that before. It will take way too long for Google to renew its cache with 200 status code.

Using DNS to Redirect Several Domains into One Single Content. Disaster?

When I searching our web site on Google I found three sites with the same content show up. I always thought we were using only one site www.foo.com, but it turn out we have www.foo.net and www.foo.info with the same content as www.foo.com.
I know it is extremely bad to have the same content under different URL. And it seems we have being using three domains for years and I have not seen punitive blunt so far. What is going on? Is Google using new policy like this blog advocate?http://www.seodenver.com/duplicate-content-over-multiple-domains-seo-issues/ Or is it OK using DNS redirect? What should I do? Thanks
If you are managing the websites via Google Webmaster Tools, it is possible to specify the "primary domain".
However, the world of search engines doesn't stop with Google, so your best bet is to send a 301 redirect to your primary domain. For example.
www.foo.net should 301 redirect to www.foo.com
www.foo.net/bar should 301 redirect to www.foo.com/bar
and so on.
This will ensure that www.foo.com gets the entire score, rather than (potentially) a third of the score that you might get for link-backs (internal and external).
Look into canonical links, as documented by Google.
If your site has identical or vastly
similar content that's accessible
through multiple URLs, this format
provides you with more control over
the URL returned in search results. It
also helps to make sure that
properties such as link popularity are
consolidated to your preferred
version.
They explicitly state it will work cross-domain.

SEO / Page Rank considerations for website redesigns

We have done many website redesigns before for companies looking to bring themselves into the 21st century. Most of them have low page rank when we are handed the project, so it is usually not a big concern of ours to maintain page rank.
However, we have recently obtained a client that is coming from a PHP-based architecture (we are a Microsoft .NET house), and one of the client's main concerns is the loss of their google page rank. Obviously the pages that have a high page rank have PHP extensions.
My questions are as follows:
Will a 301 redirect maintain page rank for each page, or is there something else we need to consider?
Since there are hundreds of pages, is there a nice "industry-standard" way of performing multiple 301 redirects? We are thinking of doing some URL rewriting of the PHP pages and performing the 301 redirect in the web form that we're redirecting to, but before we do this, we want to make sure there's not a better/cleaner way to do this.
Are there any other considerations we should take into account when dealing with a site of this magnitude with this amount of SEO success?
Any help, as always, is appreciated!
A 301 is the recommended way (straight from Google's Webmaster Tools documentation) of changing URL's for content. It is the "industry standard" and correct way of performing this task.
Your question is actually very similar to this one, so you could check there for some more relevant responses.
Look into the .Net Routing module. It would be a cleaner way to manage all those redirects in one go and in one spot.
You may have to set up IIS to send .php files to .Net
Yes, 301 redirects maintain the authority of a website or a page for SEO. (Most tests show that 90% or more of the old authority is passed).
One other related search engine optimization tip is to be sure that each page redirects / resolves only one time. i.e. not as a www & non-www or with a trailing / and without.
301
Redirect is Google Friendly and also Maintain Page Rank in Google. and second thing Web redesign is Best decision for Increase Page Rank and also Site Health.