Webmastersite.net
Register Log In

Removing URLs and Google
Google Penalty

Comments on Removing URLs and Google

mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
Posted Dec 19, 2004 - 11:06 AM:

When google tries to spider a link or cat already in its index which I have recently removed, it is re-directed to my home page. Having numerous "removed" links and cats all pointing with different names to my homepage has caused me to receive a duplicate content penalty on one of my sites. I am using mod-rewrite on 3.12.. The question is there a way to direct non-existing links and cats to a "404" or other error page?
Thermit
Member

Usergroup: Customer
Joined: Oct 25, 2004

Total Topics: 8
Total Comments: 28
Thermit
Posted Dec 19, 2004 - 6:45 PM:

That's a great question. I'd like to know the answer to that one too, because I was concerned about the same thing.

Are you sure that you've got a dup content issue? What are you seeing that indicates so to you...
mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Dec 20, 2004 - 9:49 AM:

I'd like to set up my own 404 page anyway.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 21, 2004 - 6:26 AM:

In index.php find header("Location: index.php");

die ('');

and change index.php to where you want it to go. It can't be a real 404 because index.php itself does exist even if the specific category being requested doesn't.

Will add a 'content does not exist' template in the future.
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
Posted Dec 21, 2004 - 5:08 PM:

does not seem to work, non-content still goes to index page..

header("Location: index.php");
die ('

Made changes to the index.php found in the main directory..

Am I missing something?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 23, 2004 - 12:04 AM:

You didn't actually change the important index.php there, so naturally it still goes to index.php.

That die line is actually incorrect syntax anyhow, needs a url=, but on 99.999% of servers that line won't be reached anyhow.
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
Posted Dec 23, 2004 - 3:29 PM:

Well, I'm not a programmer so I had to guess at what I was supposed to do.. I came up with this

$thiscategory = new category('id', $catid); // create proper category object
if ($thiscategory->name == '')
{
header("Location: URL=http://mydomain.com/error.html");
die ('');
}
$thiscategory->countview();

I guess you need to spell the instructions out a little clearer for me as this is incorrect...
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 24, 2004 - 12:19 PM:

No, what you're doing there is not correct. You need to simply change
header("Location: index.php"); to
header("Location: error.html");
Leave everything else alone. You could add the url= onto the meta
refresh tag, but it will never get used on your server anyhow so
there's no point.
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
Posted Dec 25, 2004 - 10:15 AM:

Happy holidays everyone...

Paul,

After making the changes, mydomain.com/480 (480 is a no content cat) I get the error.html page. However, if I enter mydomain.com/nocontent I am re-directed to the main page.
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
#10 - Quote - Permalink
Posted Dec 29, 2004 - 6:17 PM:

Is there a fix to the using cat names re-directing? As said before, using cat numbers which do not exist will direct to the error page. If I use a invalid cat name it directs to index.php
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#11 - Quote - Permalink
Posted Dec 30, 2004 - 9:00 AM:

Above if (($action == 'displaycat') && ($catid > 0))

add

if ($action == 'displaycat' && $catid == '')
{
header("Location: error.html");
}
mrkarron
Experienced

Usergroup: Customer
Joined: Oct 02, 2003

Total Topics: 33
Total Comments: 97
#12 - Quote - Permalink
Posted Dec 30, 2004 - 4:52 PM:

Thanks Paul..

removed Cats go to the error.html, however, removed subcats gets a 404 which is ok. Anything is better than going back to index.php.
morton82
Forum Regular

Usergroup: Customer
Joined: Jan 21, 2005

Total Topics: 32
Total Comments: 102
#13 - Quote - Permalink
Posted Apr 05, 2005 - 11:03 PM:

i found this thread and i guess i am having the same problem. Most of my google referral are from details pages instead of the main categories page. So is it better to change this :-
$thiscategory = new category('id', $catid); // create proper category object
if ($thiscategory->name == '')
{
header("Location: index.php");
die ('<meta http-quiv="refresh" content="0;index.php">');
}

to

$thiscategory = new category('id', $catid); // create proper category object
if ($thiscategory->name == '')
{
header("Location: error.html");
die ('<meta http-quiv="refresh" content="0;index.php">');
}
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#14 - Quote - Permalink
Posted Apr 08, 2005 - 9:28 AM:

By bringing up ancient threads you're just misleading more people. There's been a badrequest.tpl template for several versions now. So please, nobody should try to impliment the suggestions of this thread -- it's outdated.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.