VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: OriyanJ on October 31, 2016, 10:04:17 AM

Title: Deleting child products affects SEO?
Post by: OriyanJ on October 31, 2016, 10:04:17 AM
I'm using child products as dates available for each parent. Once that date passed, I no longer show it on my store, but these children are still indexed. If I publish/delete them, they become 404 pages.
I don't want to have graveyard of old children, I do want to clear them from my database, but I'm a bit afraid deleting every passed product might hurt my SEO by 404s.
Am I thinking wrong?
Title: Re: Deleting child products affects SEO?
Post by: Jumbo! on October 31, 2016, 13:03:59 PM
You a create a custom 404 page (html) with 200 header. Add ErrorDocument directive in .htaccess Refer to this Stackoverflow discussion to learn more - http://stackoverflow.com/questions/2002641/custom-404-page-sends-200-status-code

Title: Re: Deleting child products affects SEO?
Post by: Studio 42 on October 31, 2016, 18:00:30 PM
I don't think that using header with code 200 is right. Because at end you get duplicate content for this page.
404 is right and don't change anything for other indexed pages.
Perhaps using 301 or 303 can be a solution, but i think that a moment you can perhaps get blacklisted in google.
Title: Re: Deleting child products affects SEO?
Post by: Jumbo! on November 01, 2016, 15:31:48 PM
Probably I was not clear with my answer.

When a 404 error occurs server redirects the user to custom 404 page with 302 header. If the user try to access the custom 404 page directly then it will return 200 header. Refer to this post which explains this in detailed - http://stackoverflow.com/questions/19962787/rewrite-url-after-redirecting-404-error-htaccess#19962936