Can a subdomain 404 page point to a custom page?
Hi
I use the ocean wp theme to create a 404 page by video, but I found that typing https://shop.atolldive.com/sdgdfgdfgf at the URL doesn't link to the set 404 page, or to the original 404 page not found. .?
it is still linked to the wordpress preset 404 page
https://www.youtube.com/watch?v=6yo1jnM0DJg
I have two websites on the host. One main domain www.atolldive.com One subdomain is shop.atolldive.com.
The main website is a 404 page that can be customized to a custom, but the subdomain cannot be guided, and it always points to the wordpress preset 404.
<img alt="1" src="https://user-images.githubusercontent.com/39883426/42640153-421b2f02-8624-11e8-905b-2d7a0b6c8054.JPG">
<img alt="2" src="https://user-images.githubusercontent.com/39883426/42640154-4251731e-8624-11e8-8c47-82455d0391b0.JPG">
<img alt="3" src="https://user-images.githubusercontent.com/39883426/42640156-428f0422-8624-11e8-97a6-ef1c3d4c982d.JPG">
I contacted the customer service of the set theme and got the following reply. How can I solve the 404 custom page orientation of the subdomain? Does the host not support it?
nicolas-owp commented 30 minutes ago
Hello, it seems something related to your host, contact him and ask him why instead of the default 404 page, you have another page?
Atollmicro commented 26 minutes ago •
This is the website of my subdomain.
I have another main domain www.atolldive.com on this host. The 404 page of this website is normal.
Can a host have only one 404 page?
Two different websites. I use the linode nginx host.
nicolas-owp commented 20 minutes ago
Hi, you will need to contact him because there is no redirection in OceanWP, it is the default 404 page of WordPress which is just customized in the theme.
4 Replies
Hey there,
To clarify a little bit more what you are seeing, this likely wouldn't have something to do with the hosting provider. Because Linode is an unmanaged hosting provider, we don't touch or edit the internal configurations and applications of the individual Linodes on your account. They may be assuming Linode is a managed hosting provider which would be inaccurate in this case.
That being said, to address what you are seeing, I am curious: For your Wordpress subdomain do you have a separate root folder for that subdomain with a different .htaccess
file? If you have virtual hosts set up so that all connection attempts made to https://shop.atolldive.com/ go to that folder, you should just need to edit the .htaccess
file there to include a line like:
ErrorDocument 404 /path/to/subdomain/404.html
This will specify the 404 page for that particular .htaccess connection. If I am incorrect about how you are managing the subdomain, please let us know how you have that set up and we might be able to assist you further. Thanks in advance!
My main domain is rooted at /www/wwwroot/www.atolldive.com/
The subdomain path is in the same root directory as the primary domain.
Root directory /www/wwwroot/shop.atolldvie.com/
I set shop.atolldive.com/.htacess as follows, but I still can't point it correctly.
ErrorDocument 404 /path/to/shop.atolldvie.com/404.html
I use the ocean wp theme to set the 404 page (404.php), which can point to the custom 404 page on other hosts.
On this host I use the bt.cn panel. The main domain can be directed to the custom 404 page by ocean wp theme.
Only subdomains don't work!
github ask question include images.
https://github.com/oceanwp/oceanwp/issues/111#issuecomment-404548150
The main domain www.atoll dive.com is not set in .htaccess files.
Can be directed to custom 404 pages.
But this problem is encountered when setting the subdomain.
I also tested a subdomain in another virtual host.
According to the ocean wp theme 404 page setting, the results are available.
In linode nginx alone, the subdomain 404page is the leading wordpress preset 404 page.
I think the nignix subdomain settings are different.
ex. http://pic02.atolldive.tk/5454
I reading this page. https://www.garron.me/en/bits/custom-404-nginx-apache.html
https://laracasts.com/discuss/channels/forge/custom-404-page-nginx