Ok to use meta noindex on 404 pages?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I have a custom 404.html file on my website that gets served with a 404 status code when a URL is not found, standard stuff. But if you visit the exact path /404.html on the server, the server says "hey, there's actually a file there" and shows you the 404 page but without the 404 status code.



I wanted to make sure that the /404.html path doesn't get accidentally indexed in search, so I added a <meta name="robots" content="noindex"> tag to it.



Of course, that means that my nonexistant URLs also have the meta noindex tag as part of the 404 page. Is there any way that the presence of this meta noindex tag could cause an issue for search engines / crawlers, or is this setup totally fine?










share|improve this question

























  • Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

    – Stephen Ostermiller
    Jan 30 at 22:32











  • I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

    – Stephen Ostermiller
    Jan 30 at 22:34


















4















I have a custom 404.html file on my website that gets served with a 404 status code when a URL is not found, standard stuff. But if you visit the exact path /404.html on the server, the server says "hey, there's actually a file there" and shows you the 404 page but without the 404 status code.



I wanted to make sure that the /404.html path doesn't get accidentally indexed in search, so I added a <meta name="robots" content="noindex"> tag to it.



Of course, that means that my nonexistant URLs also have the meta noindex tag as part of the 404 page. Is there any way that the presence of this meta noindex tag could cause an issue for search engines / crawlers, or is this setup totally fine?










share|improve this question

























  • Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

    – Stephen Ostermiller
    Jan 30 at 22:32











  • I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

    – Stephen Ostermiller
    Jan 30 at 22:34














4












4








4








I have a custom 404.html file on my website that gets served with a 404 status code when a URL is not found, standard stuff. But if you visit the exact path /404.html on the server, the server says "hey, there's actually a file there" and shows you the 404 page but without the 404 status code.



I wanted to make sure that the /404.html path doesn't get accidentally indexed in search, so I added a <meta name="robots" content="noindex"> tag to it.



Of course, that means that my nonexistant URLs also have the meta noindex tag as part of the 404 page. Is there any way that the presence of this meta noindex tag could cause an issue for search engines / crawlers, or is this setup totally fine?










share|improve this question
















I have a custom 404.html file on my website that gets served with a 404 status code when a URL is not found, standard stuff. But if you visit the exact path /404.html on the server, the server says "hey, there's actually a file there" and shows you the 404 page but without the 404 status code.



I wanted to make sure that the /404.html path doesn't get accidentally indexed in search, so I added a <meta name="robots" content="noindex"> tag to it.



Of course, that means that my nonexistant URLs also have the meta noindex tag as part of the 404 page. Is there any way that the presence of this meta noindex tag could cause an issue for search engines / crawlers, or is this setup totally fine?







seo web-crawlers 404 noindex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 at 20:28







Maximillian Laumeister

















asked Jan 30 at 18:24









Maximillian LaumeisterMaximillian Laumeister

4,8161829




4,8161829













  • Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

    – Stephen Ostermiller
    Jan 30 at 22:32











  • I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

    – Stephen Ostermiller
    Jan 30 at 22:34



















  • Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

    – Stephen Ostermiller
    Jan 30 at 22:32











  • I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

    – Stephen Ostermiller
    Jan 30 at 22:34

















Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

– Stephen Ostermiller
Jan 30 at 22:32





Alternately you could name the file /404-3pAhD3tM.html which would be unlikely to ever to get crawled unless you linked to it or had directory indexes on.

– Stephen Ostermiller
Jan 30 at 22:32













I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

– Stephen Ostermiller
Jan 30 at 22:34





I also suspect that if Google did crawl /404.html it would treat it as a "soft 404" because it presumably has "Page Not Found" in the title and H1.

– Stephen Ostermiller
Jan 30 at 22:34










1 Answer
1






active

oldest

votes


















6














There's no problem having a meta noindex tag on the 404 page, to prevent 200 OK responses being indexed.



If this was a PHP page then you could obviously just send a 404 Not Found header as part of the standard response - to make sure that it always returns a 404.



You could also use .htaccess (mod_rewrite) to force any direct requests to 404.html to also trigger a 404:



RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^404.html$ - [R=404]


The RewriteCond directive that checks the REDIRECT_STATUS environment variable is required if you want your custom 404 to be served (so that it only applies to direct requests). Otherwise, there will likely be a rewrite loop (500 error) when trying to serve the custom error document and you'll see the standard server generated 404 response (but it's still a 404).






share|improve this answer





















  • 1





    Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

    – Maximillian Laumeister
    Jan 30 at 21:59












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "45"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebmasters.stackexchange.com%2fquestions%2f120620%2fok-to-use-meta-noindex-on-404-pages%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














There's no problem having a meta noindex tag on the 404 page, to prevent 200 OK responses being indexed.



If this was a PHP page then you could obviously just send a 404 Not Found header as part of the standard response - to make sure that it always returns a 404.



You could also use .htaccess (mod_rewrite) to force any direct requests to 404.html to also trigger a 404:



RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^404.html$ - [R=404]


The RewriteCond directive that checks the REDIRECT_STATUS environment variable is required if you want your custom 404 to be served (so that it only applies to direct requests). Otherwise, there will likely be a rewrite loop (500 error) when trying to serve the custom error document and you'll see the standard server generated 404 response (but it's still a 404).






share|improve this answer





















  • 1





    Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

    – Maximillian Laumeister
    Jan 30 at 21:59
















6














There's no problem having a meta noindex tag on the 404 page, to prevent 200 OK responses being indexed.



If this was a PHP page then you could obviously just send a 404 Not Found header as part of the standard response - to make sure that it always returns a 404.



You could also use .htaccess (mod_rewrite) to force any direct requests to 404.html to also trigger a 404:



RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^404.html$ - [R=404]


The RewriteCond directive that checks the REDIRECT_STATUS environment variable is required if you want your custom 404 to be served (so that it only applies to direct requests). Otherwise, there will likely be a rewrite loop (500 error) when trying to serve the custom error document and you'll see the standard server generated 404 response (but it's still a 404).






share|improve this answer





















  • 1





    Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

    – Maximillian Laumeister
    Jan 30 at 21:59














6












6








6







There's no problem having a meta noindex tag on the 404 page, to prevent 200 OK responses being indexed.



If this was a PHP page then you could obviously just send a 404 Not Found header as part of the standard response - to make sure that it always returns a 404.



You could also use .htaccess (mod_rewrite) to force any direct requests to 404.html to also trigger a 404:



RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^404.html$ - [R=404]


The RewriteCond directive that checks the REDIRECT_STATUS environment variable is required if you want your custom 404 to be served (so that it only applies to direct requests). Otherwise, there will likely be a rewrite loop (500 error) when trying to serve the custom error document and you'll see the standard server generated 404 response (but it's still a 404).






share|improve this answer















There's no problem having a meta noindex tag on the 404 page, to prevent 200 OK responses being indexed.



If this was a PHP page then you could obviously just send a 404 Not Found header as part of the standard response - to make sure that it always returns a 404.



You could also use .htaccess (mod_rewrite) to force any direct requests to 404.html to also trigger a 404:



RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^404.html$ - [R=404]


The RewriteCond directive that checks the REDIRECT_STATUS environment variable is required if you want your custom 404 to be served (so that it only applies to direct requests). Otherwise, there will likely be a rewrite loop (500 error) when trying to serve the custom error document and you'll see the standard server generated 404 response (but it's still a 404).







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 30 at 22:00

























answered Jan 30 at 21:12









MrWhiteMrWhite

32k33367




32k33367








  • 1





    Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

    – Maximillian Laumeister
    Jan 30 at 21:59














  • 1





    Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

    – Maximillian Laumeister
    Jan 30 at 21:59








1




1





Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

– Maximillian Laumeister
Jan 30 at 21:59





Thank you for the good ideas. For my hosting setup it's easiest to just leave the meta noindex in place, so it's good to know it won't cause any issues if I do.

– Maximillian Laumeister
Jan 30 at 21:59


















draft saved

draft discarded




















































Thanks for contributing an answer to Webmasters Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebmasters.stackexchange.com%2fquestions%2f120620%2fok-to-use-meta-noindex-on-404-pages%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith