Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Recommended way to handle 301 redirects for deleted documents? View modes: 
User avatar
Member
Member
Redactuk - 6/26/2012 10:28:57 AM
   
Recommended way to handle 301 redirects for deleted documents?
Can someone please advise me on the best way for handling situation when documents get deleted? From time to time URLs appear in Error Log for documents that were deleted by got indexed by search engines. Via Apacher I'm used to simply adding these to an .htaccess file, but in IIS are these best handled via IIS rewrite module, web.config or internally within Kentico?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/26/2012 4:34:39 PM
   
RE:Recommended way to handle 301 redirects for deleted documents?
Hi,

If the document was deleted, a 404 error should be returned and the search engine crawler should remove it from the database.

If you want to have the 301 redirection then you have to keep the document and set the redirection to it.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Redactuk - 6/26/2012 9:12:58 PM
   
RE:Recommended way to handle 301 redirects for deleted documents?
These are actually incorrect URLs that have got ondexed in Google. Example:

www.mydomain.com/CMSPages/~/getdoc/b97de1df-63ef-49e6-84fb-f49fe40e4640/Roadshows.aspx

It goes nowhere and Kentico reports it as an error. I just want to 301 redirect them.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/28/2012 4:49:20 PM
   
RE:Recommended way to handle 301 redirects for deleted documents?
Hi,

I would rather fix the issue why the tilde sign is being rendered - see this KB article.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Redactuk - 6/28/2012 6:50:21 AM
   
RE:Recommended way to handle 301 redirects for deleted documents?
Ok. So just to confirm you are saying that if document no longer exists then any URL redirection should be done outside Kentico i.e. via IIS?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/28/2012 4:47:23 PM
   
RE:Recommended way to handle 301 redirects for deleted documents?
Hi,

In this case yes since the CMS does not know about the document anymore that was deleted - it will return 404 page not found for its URL.