Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I want to know the advantage of 404 Not Found page. Why should one create a design for that ? Why not just set 404 header and redirect it to the home page with a message something like "What do you want of the URL? Please just walk into the website".
I figured many websites have a special page for the purpose. But why ?
Regards
404 Not Found
The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.
Hypertext Transfer Protocol (HTTP/1.1), section 6.5.4
404 pages let users know that the page does not exist.
Many people will change the URL manually (for example, /pictures/page/1 to /pictures/page/2). If you redirect the user to the front page it will be confusing to them. What they expected to happen (either go to page 2 or get a "Page not found" error) will not happen; finding themselves on the front page is not useful.
The more important thing, however, is that users should ideally never see 404 pages. When they actually do see one, it should be very clear that the page does not exist. Redirecting them does not tell them that the page does not exist; it tells them that... it is the front page, which it should not be. It is confusing.
Another issue is that search engines may find it odd that a lot of your pages get redirected to your front page. It is not exactly how the internet is supposed to work, so they may actually penalize your website because of it.
If you want your users to have a good experience on your website then your 404 pages should attempt to help them find whatever they were looking for. Some things you can show the user are:
A search box. Google has custom search boxes you can put on your website, which only search your site. If making your own is too complicated then this is a good solution.
If you are able to do something like this, then showing the user content that may be similar to what they are looking for can be useful. Just make sure that it works reasonably well. For example if you cannot find anything similar then don't show random stuff -- it is not helpful.
The newest content on the page. This is especially useful if it is a blog, news site, or some other kind of website that frequently gets new content.
The most popular content. If the user is just browsing to pass the time then popular content may allow them to continue browsing without leaving your website.
A link to or showing a sitemap may also be useful if the website is small enough to summarise on one page.
...and so on. Just try to think of what would be helpful to the user.
A good custom 404 page will help people find the information they're looking for, as well as providing other helpful content and encouraging them to explore your site further.
Moreover if you do not make your own custom page, the server's 404 error will be displayed which would not go by the design of your website. There are also negative elements which would try to access the unauthorized pages, and keeping a check of the same will give a sense of secured website.
What if you go in a departmental store and looking for a soap which
actually is out of stock, but the store keeper just make you to start
again from the section. Isin't the message not available is a
better option? The same goes here
The idea of a 404 page is to tell the user that the file they were looking for wasn't found, or that the link they clicked on was broken.
Say you're running a news site and a user clicks on a link to an article on your site, but the article has been deleted. A 404 page makes it very clear to the user that the article is gone. If you just redirect them to your homepage, they might think a featured article on your page is the one they were linked to, or that they got redirected for no reason. They won't have any reason to think that what they were looking for no longer exists on your server.
So the purpose of a 404 page is to say "Hey, what you were looking for isn't here." If you want to get more fancy, you can even use a 410 error instead, which means "Hey, what you were looking for used to be here, but it's gone now."
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am trying to secure my WordPress site from hackers - more specifically, individual non-content pages that appear to be getting more hits. I am using Siteground and installed WordPress a few months ago. Checking the website statistics I was taken aback by what I saw. I have briefly summarised the page hits below.
https:// ... /wp-admin/admin-ajax.php --> this page has been viewed over 16k times each month. Considering my site has been live for only 2 months, contains no SEO, and no-one knows about its existence this is odd!
https:// ... /index.php/wp-json/wp/v2/users/ --> this page is giving away my usernames.
https:// ... /index.php/wp-json/wp/v2/pages --> appears to display code from one of my main pages.
And a whole load of pages that appear very odd to be accessing:
https:// ... /index.php/wp-json/wp/v2/taxonomies
https:// ... /index.php/wp-json/wp/v2/categories
https:// ... /index.php/wp-json/wp/v2/taxonomies/post_tag
https:// ... /index.php/wp-json/wp/v2/taxonomies/category
https:// ... /index.php/wp-json/wp/v2/tags
https:// ... /wp-admin/load-styles.php --> shows blank screen
There's a whole load more, some redirects to the WordPress login page and others show a blank screen. There's also some URLs that allow any user to download a *.woff file (whatever that is?!).
Point is, I thought WordPress would be secure enough to not let these pages appear visible and show details at the very least.
Is there anything I can do? As I pointed out, I'm using Siteground which doesn't use cPanel.
I thought the most difficult part of a blog site is the content creation and overall web design. I'm not sure now.
Any help and/or advice would be greatly appreciated.
Thank you.
As for accessing login pages, that's to be expected with a WordPress site - bots love them.
You should have a strong password and use a nonstandard username for your admin-rights accounts. Bots will always access the default page with default login credentials to try it out. You could go another step and move the login page, too, that will massively drop accesses to the real login page, there's a plugin for it if you aren't comfortable coding that yourself: WPS Hide Login.
As for the wp-json URLs, you can ensure they are requiring logins / disabled with answers provided here, such as a plugin that disables it: Disable REST API.
Concerning the .woff files, those are just font files, either a bot scrapes over them or a user is accessing them to view the web page as it was designed; not a concern really.
WordPress has a decent article on additional things you can do to secure your website as well here.
We are using Joomla for a public site and we are getting a ton of soft 404 errors that all look similar to
/?option=com_k2&view=itemlist&task=user&id=xxx
where xxx = some numeric id. Obviously this is some soft of spamming but how do I turn it off in Joomla/K2?
I'm not particularly Joomla oriented but this seems a task I should be able to accomplish if I can get an idea of "where" to fix the code. The page shows a warning instead of an error
Warning
JUser: :_load: Unable to load user with ID: 35414
so it seems the "page" is actually there but with no content. I'm guessing some internal handler is spitting this dynamic content out but I want to return 404 in this case. Any ideas would be appreciated.
I'm trying to understand the nature of your problem. What do you mean with "Soft 404" errors? Do you have 404 errors or not?
On my K2 websites, I have sometimes "visitors" who try to find holes in K2. I then have many, many accesses of the same page. These visitors try to post comments or somethings else on the articles or user profiles.
Is this a similar thing that is happening on your site?
Is there a (Joomla) user on your site with ID 35414? If not, you can be pretty sure that someone is trying to hack your site.
Is the URL always requested by the same user? You can find this in the log files of the Apache server. In such cases I add a "deny from" statement to my .htaccess file.
In case you seriously expect a K2 related issue, I would recommend to post the issue in the K2 forum. This forum is quite knowledgeable and JoomlaWorks makes a serious effort to bring good K2 customer support.
I hope this is OK to ask here. I am almost ready to upload a new theme to my blog. Which after some serious consideration and research in SEO I have decided to restructure some of the pages, their child pages and to remove some of the categories.
Unfortunately this will result in various 404 results which will be bad for my site.
What I want to do is this:
On the 404 page, before it loads get last parameter of url, so for example: example.com/parent/child-page-name/
Then perform a check in wordpress using get_page_by_title().
If the page exists get the page permalink then use php header location to send 301 redirect to the new page.
if not, display 404 page with search options etc..
Is this a good way to handle this? is 301 the correct redirect?
To answer your redirect question, yes the 301 redirect is the correct one to use as it passes on the link equity from the last page.
Rather than using PHP to automatically solve your 404 problem when the new blog is launched, I'd crawl your website first and manually redirect all the old links to the new ones. It's tedious, but it will make sure nothing slips through the cracks that an automated process may otherwise miss.
A good way to do this is to crawl your site as it is at the moment, put all the links into a spreadsheet and put the new urls into the next column. From there you can concatenate the urls into a rewrite rule for the .htaccess file.
To show you what I mean, I have set up a basic sheet you can use to help you out.
https://docs.google.com/spreadsheets/d/1htHq0oeATsfrFJpAxKg0_e5dJqSmJ_idrrH-tudkuq4/edit?usp=sharing
Source: Past experience, Commercial SEO Technician for 2 years
I have a Joomla! website with rewrite rules activated. My article URl is mysite.com/category/ID-alias.html. The only thing which is important (from this url) is the id, because when I can access the article with any text at "category" and any text at "alias".
Let's show a concrete example:
My article URL: mysite.com/flowers/15-begonia.html
I can access the same by changing category name and alias directly from url:
mysite.com/tralala/15-anything.html //Shows the same article as above.
Is this SEO? If one of my visitors want to destroy my website SEO, can he open my articles with different addresses (like above) and Google will say that articles are duplicated? Does Google knows when a visitor goes to a webpage to which link doesn't exists anywhere?
Hope my question is clear.
Thanks.
Google do a good job of deciding which is the "right" version of a page - it is worth watching this video to see how they handle this situation:
http://www.youtube.com/watch?v=mQZY7EmjbMA
Since these wrong URLs should not be linked to from anywhere, it is unlikely they will be indexed by mistake.
However, should they index the wrong version of a page, setting a sitemap with the right one will usually fix it.
A visitor could not harm your SEO with this knowledge. The worst they could do would be to provide good links to a non-indexed page, which would cause the wrong URL to be indexed. However, it would then be very easy for you to 301 redirect that page and turn their attempts at harm into an SEO benefit.
I personally think Joomla should look into adding the canonical tag, but if you want that currently, you must use an extension like this:
http://extensions.joomla.org/extensions/site-management/seo-a-metadata/url-canonicalization-/25795
(NB I have never used this extension so cannot guarantee its quality - the reviews are good, though)
I recently made some major changes to an ecommerce website that include url structure. The url to view a product is modified by .htaccess and contains a short product description that if changed will not affect the results on the page.
example: www.Example.com/staticFolder/non-deterministic-product-details/MODEL#.html
Now in the error log file I am seeing bingbot requesting pages like example.com/non-deterministic-product-details
Our sitemaps don't link to this page and I am not able to find any bad links on pages. Has anyone else had problems with bingbot doing this? I found another question that was locked for being random. Bingbot causing 404 errors. Is it more likely that I am doing something wrong? Should I avoid using psuedo directories in my .htaccess?
-Thanks
There's nothing requiring that spiders stick only to link-crawling. It's entirely possible it's guessing URLs which are similar to known ones in the hope that it'll find something.
At any rate, I wouldn't worry about it unless you know it's following a bad link. It's quite normal to get lots of requests for non-existent pages.