php seo 404 error in webmaster tool

0 votes

 I have a PHP site that has 1000s of pages, and I delete some pages every day that has been indexed by google.  If a visitor comes to one of the pages I have deleted, they will be taken to the "search for related contents " page.

The code I use : 
if($deleted = true){
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: /products-search.php");
    exit(); 
}

In the Google webmaster tool, I am getting a lot of soft 404 errors for the pages of this type. the message says: The target URL doesn't exist, but your server is not returning a 404 (file not found) error. Learn more

I don't want the user to get 404 error. Any solution ?

Mar 12, 2022 in Digital Marketing by Kichu
• 19,040 points
452 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
0 answers

SEO: Why "indexed pages" in Webmaster Tools and the command "site:" gives so much difference?

"Indexed URLs: 305,509"webmaser shows this when i ...READ MORE

Mar 2, 2022 in Digital Marketing by Kichu
• 19,040 points
454 views
0 votes
0 answers

.htaccess give 404 Not Found when url in SEO-friendly URL

Im using opencart fresh install and using ...READ MORE

Mar 4, 2022 in Digital Marketing by Kichu
• 19,040 points
1,140 views
0 votes
0 answers

Replace tags with space in PHP for SEO Meta Description

I am trying to strip tags from ...READ MORE

Mar 12, 2022 in Digital Marketing by Kichu
• 19,040 points
593 views
0 votes
0 answers

SEO and 404 error redirection

Recently I've removed some products and categories ...READ MORE

Mar 13, 2022 in Digital Marketing by Kichu
• 19,040 points
433 views
0 votes
0 answers

On installing seo suite in magento error is displayed

On installing mageworx SEO suite ultimate extension ...READ MORE

Mar 13, 2022 in Digital Marketing by Kichu
• 19,040 points
548 views
0 votes
0 answers

Replace tags with space in PHP for SEO Meta Description

I am trying to strip tags from ...READ MORE

Mar 13, 2022 in Digital Marketing by Kichu
• 19,040 points
640 views
+2 votes
2 answers

Is Reactjs SEO friendly? with google bots

Yes, with SERVER-SIDE RENDERING you will not face ...READ MORE

answered Feb 10, 2022 in Others by Shreesh
• 160 points
2,838 views
0 votes
1 answer

Google Indexing + Yoast SEO Media Attachments

as per the official yoast blog the ...READ MORE

answered Feb 11, 2022 in Others by narikkadan
• 63,600 points
504 views
0 votes
1 answer

Create an seo and web accessibility analyzer

there are some tools which  are already ...READ MORE

answered Feb 12, 2022 in Others by narikkadan
• 63,600 points
444 views
0 votes
1 answer

SEO - How to Show Phone Numbers in Google Search

<div itemscope itemtype="http://schema.org/LocalBusiness">         <span itemprop="telephone"><a href="tel:01234555666">Link Text Here</a></span>     </div> use ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
416 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP