Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:config:understanding_404 [2018/05/24 09:06] Tihomir |
litespeed_wiki:config:understanding_404 [2018/05/30 14:09] Lisa Clarke Proofreading and Reformatting |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Understanding Error 404 Not Found ===== | + | ====== Understanding Error 404 Not Found ====== |
- | In most cases this error is related to missing/misconfigured file or webpage. When the user request that file or webpage the Litespeed web server will return the information that there is something wrong and it cant find that file. Lets see what can trigger that error and how to resolve it. | + | {{:litespeed_wiki:config:404.png?400|}} |
+ | In most cases Error 404 is related to a missing or misconfigured file or webpage. When the user requests that file or webpage, LiteSpeed Web Server will return a 404 code. 404 indicates that there is something wrong, and LSWS can't find that file. Let's see what can trigger this error and how to resolve it. | ||
- | ==== Missing file ==== | + | ===== Missing file ===== |
- | Many templates include path to favicon.ico but not the actual icon and when you load your site you can see in the developer console line like: | + | Many templates include a path to ''favicon.ico'', but not the //actual// favicon, and when you load your site you can see in the developer console a line like: |
<code> GET https://domain.com/favicon.ico 404 </code> | <code> GET https://domain.com/favicon.ico 404 </code> | ||
- | In that case the error is not fatal but its a good practice to resolve that. To do that simple find the included path for that icon and put it there. You can use that method to resolve not only missing favicon but other files too. | + | In this case the error is not fatal, but it's a good practice to resolve it anyway. To do so, simply find the included path for the favicon and then put the favicon there. You can use that method to resolve not only missing favicons but other files too. |
- | ==== Missing Rewrite Rules ==== | + | ===== Missing Rewrite Rules ===== |
- | This is the second most common reason for error 404. For example if you change permalink structure of your website but you did not put rewrite rules or redirects for that you will see the error. You can reverse the changes for permalinks or review your .htaccess file and put the right rules there. | + | This is the second most common reason for Error 404. For example, if you change the permalink structure of your website, but you do not put rewrite rules or redirects in place, LSWS won't be able to find the page's new location, and will return a 404. You can reverse the changes for permalinks, or review your ''.htaccess'' file and put the right rules there. |
- | ==== Wrong Rewrite rules ==== | + | ===== Wrong Rewrite Rules ===== |
- | If you put, for example redirect from your index page to home page, but the last one did not exist you will see again error 404. The same think can be apply if you put wrong rewrite rules. You can temp rename your .htaccess file from FTP client or with terminal command: | + | If you put, for example, a redirect from your index page to a different home page, but the home page does not exist, you will see Error 404. The same thing can apply if you enter incorrect rewrite rules. You can temporarily rename your ''.htaccess'' file from an FTP client or with the following terminal command: |
<code> mv .htaccess htaccess-wrong </code> | <code> mv .htaccess htaccess-wrong </code> | ||
- | or you can reverse the latest changes to that file. | + | Or you can reverse the latest changes to that file. |
- | ==== Different Web Server ==== | + | ===== Different Web Server ===== |
- | If you or your hosting provider change the web server for example to nginx in some cases you will see error 404. Some web server did not read the .htaccess file and you need to contact your hosting provider or you can manually make change to include the critical rules directly in the .conf/vconf file for that web server. | + | If you or your hosting provider change the web server (for example, to NGiNX) in some cases you will see Error 404. Some web servers do not read the ''.htaccess'' file, and you need to include the critical rules directly in the ''.conf''/''vconf'' file for that web server. You may need to contact your hosting provider for help with that. |
- | ==== Removed domain name ==== | + | ===== Removed Domain Name ===== |
- | Depend on the server configuration in some cases when domain name is point to server but its not added there you can see the error. You can contact your hosting provider for additionally information or you can review the server if you have access. | + | Depending on the server configuration, in some cases when a domain name points to a server but the virtual host doesn't exist, you can see a 404 error. You can contact your hosting provider for additional information, or you can review the server configuration if you have access. |
- | ==== Wrong Document root ==== | + | ===== Wrong Document Root ===== |
- | This is a command mistake when the new vhost is created and the user put wrong document root. In that case the web server will search for the files in different directory and when they are not there you will see error 404. | + | This is due to a command mistake when the new vhost is created, The user adds the wrong document root. In that case the web server will search for the files in a different directory, and when they are not there you will see Error 404. |
- | ==== Changed NS server for a domain name ==== | + | ===== Changed NS Server for a Domain Name ===== |
- | If you change the Name Servers (NS) for a domain name before configurate the domain/webpage in the new location you can experience 404. Always change NS server after the domain/webpage is properly working on the new location. | + | If you change the Name Servers (NS) for a domain name before configuring the domain/webpage in the new location, you can experience a 404. Always change NS server //after// the domain/webpage is properly working in the new location. |
- | ==== DNS cache ==== | + | ===== DNS Cache ===== |
- | If you migrate your page to new server, change the NS servers for the domain and delete the content on the old server its posable to see error 404. That is because most of the ISP (Internet service provider) has DNS cache and your page is still loading from the old location. Its a good practice to not delete the content from the old server for 3-4 days to avoid that. | + | If you migrate your page to a new server, change the NS servers for the domain and delete the content on the old server, it's still possible to see Error 404. That is because most ISPs (Internet Service Providers) have DNS caching in place, and your page is still loading from the old location. Its a good practice not to delete the content from the old server for 3-4 days to avoid such an issue. |