Details

      Description

      When a content has been deleted, it's better to return a 410 error code than a 404.

      It allows google and others search engine to understand that the content has existed and has been definitly removed and it forces the URL to be unindexed from the search engine faster.

      The 404 error code should only be returned for contents which have never existed

      eZPublish should make the difference beetween the both case in order to improve its SEO compliancy.

        Activity

        Hide
        Denitsa M added a comment -

        This problem is still valid and very important for seo, and nothing is done on it yet as I see; at latest ezp versions deleted objects keep resulting in 404 response to indexation instead of 410 Gone to tell search engine to drop index for page and not index anymore, and this would be really nice!

        Any consideration about this issue?

        Show
        Denitsa M added a comment - This problem is still valid and very important for seo, and nothing is done on it yet as I see; at latest ezp versions deleted objects keep resulting in 404 response to indexation instead of 410 Gone to tell search engine to drop index for page and not index anymore, and this would be really nice! Any consideration about this issue?
        Hide
        Jérôme Cohonner added a comment -

        In reply to comment #022423
        Note that you can change the error code returned by eZ Publish by overriding error.ini

        Show
        Jérôme Cohonner added a comment - In reply to comment #022423 Note that you can change the error code returned by eZ Publish by overriding error.ini
        Hide
        Denitsa M added a comment -

        In reply to comment #022424
        Yes, I can, but this means if I pair up kernel 3 with http 410 in error.ini file, then I will get 410 in both cases - page gone and page not found, or am I mistaken?

        Show
        Denitsa M added a comment - In reply to comment #022424 Yes, I can, but this means if I pair up kernel 3 with http 410 in error.ini file, then I will get 410 in both cases - page gone and page not found, or am I mistaken?
        Hide
        Carlos Revillo added a comment -

        In reply to comment #022425
        so, the key here is how to know if a content has existed in the past or not, right? is this possible?

        Show
        Carlos Revillo added a comment - In reply to comment #022425 so, the key here is how to know if a content has existed in the past or not, right? is this possible?
        Hide
        Jérôme Cohonner added a comment -

        In reply to comment #022426
        I don't think so. We remove any data when we remove a content.

        If we want to develop an extension to do so, we should trigger the delete event with a workflow, add nodes URLs to a specific table and redirect error module to a custom one that would test this table before sending an error message 404 or 410.

        Show
        Jérôme Cohonner added a comment - In reply to comment #022426 I don't think so. We remove any data when we remove a content. If we want to develop an extension to do so, we should trigger the delete event with a workflow, add nodes URLs to a specific table and redirect error module to a custom one that would test this table before sending an error message 404 or 410.
        Hide
        Gaetano Giunta added a comment -

        In reply to comment #022427
        Nice suggestion.

        The only thing I'd like to see improved in order to make this dev easy is our support for custom error pages. Currently the flexibility offered by the error management system does not match what are the most common usage scenarios...

        Show
        Gaetano Giunta added a comment - In reply to comment #022427 Nice suggestion. The only thing I'd like to see improved in order to make this dev easy is our support for custom error pages. Currently the flexibility offered by the error management system does not match what are the most common usage scenarios...
        Hide
        Stefan Eickhoff added a comment -

        Yes it is possible with an extension. I just tried it as suggested.
        I guess the error.ini.append.php is sufficent enough to see how this can be done.

        <?php /* #?ini charset="utf-8"? 
         
        [ErrorSettings-kernel]
        # 404 handler for 'module not found'
        HTTPError[20]=
        ErrorHandler[20]=rerun
        RerunURL[20]=/custom-error/dispatch
         
         
        [ErrorSettings-custom-error]
        ErrorHandler[]
        RedirectURL[]
        RerunURL[]
        EmbedURL[]
         
        ErrorHandler[NotFound404]=rerun
        RerunURL[NotFound404]=/custom-error/view/page%20not%20found/404
        HTTPError[NotFound404]=404
         
        ErrorHandler[Gone410]=rerun
        RerunURL[Gone410]=/custom-error/view/page%20gone/410
        HTTPError[Gone410]=410
         
         
        HTTPError[Gone410]=410
        [HTTPError-410]
        HTTPName=Gone
         
        */ ?>
        

        But even though it is working I did not like it, too many roundtrips.
        After some thinking I considered patching kernel/error/view a "cleaner" solution.
        I like the idea of more flexible custom error pages.

        Show
        Stefan Eickhoff added a comment - Yes it is possible with an extension. I just tried it as suggested. I guess the error.ini.append.php is sufficent enough to see how this can be done. <?php /* #?ini charset="utf-8"?   [ErrorSettings-kernel] # 404 handler for 'module not found' HTTPError[20]= ErrorHandler[20]=rerun RerunURL[20]=/custom-error/dispatch     [ErrorSettings-custom-error] ErrorHandler[] RedirectURL[] RerunURL[] EmbedURL[]   ErrorHandler[NotFound404]=rerun RerunURL[NotFound404]=/custom-error/view/page%20not%20found/404 HTTPError[NotFound404]=404   ErrorHandler[Gone410]=rerun RerunURL[Gone410]=/custom-error/view/page%20gone/410 HTTPError[Gone410]=410     HTTPError[Gone410]=410 [HTTPError-410] HTTPName=Gone   */ ?> But even though it is working I did not like it, too many roundtrips. After some thinking I considered patching kernel/error/view a "cleaner" solution. I like the idea of more flexible custom error pages.

          People

          • Assignee:
            unknown
            Reporter:
            eZ Professional Services France
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: