Https and 404 code that goes into htaccess
-
The 404 error code we put into htaccess files for our websites does not work correctly for our https site.
We recently changed one of our http sites to https.
When we went to create a 404.html page for it by creating an htaccess folder with the 404 error code in it, once we uploaded the file all of our webpages were displaying incorrectly, as if the css was not attached.
The 404 code we used works successfully for our other 404.html pages for our other sites (www.telfordinc.com/404.html). However, it does not work for the https site.
Below is the 404 error code we are using for our https site (currently not uploaded until pages display correctly)
ErrorDocument 404 /404-error.html
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?privatemoneyhardmoneyloan.com/.*$ [NC] RewriteRule .(gif|jpg|js|css)$ - [F]
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.privatemoneyhardmoneyloan.com$ [NC] RewriteRule ^(.*)$ http://www.privatemoneyhardmoneyloan.com/$1 [R=301,L]
So we want to know if there is a different 404 error code that goes into the htaccess file for an https vs. http?
Appreciate your feedback on this issue
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Migrating website to new CMS and to https://
Hi, We are migrating an old website to a new one built in Wordpress soon. We also added an SSL to change to https:// Most of the url's stay the same. Can we just migrate from http to https on server level, and for the url's that do change just set a 301 redirect? Or are there other things we should take into account?
Technical SEO | | Mat_C0 -
Traffic goes down after migration from aws to Microsoft azure cloud service
After migration of web application from aws ec2 instance to Microsoft azure web App service, we observed that we lost our 50% traffic. Our site custom domain is ihealthmantra.com and azure web App has default domain azurewebsites.net . Azure WebApp service has drawback that default domain gets in picture after mapping to my custom domain .We have mapped azure webAPP host name to our custom domain as CNAME record in DNS Table . Now same site working with two domains i.e ihealthmantra.com as well ass azurewebsites.net . As we seen this issues we made 301 redirection from azure default domain to our custom domain, Still no change in traffic.Google is now showing external links from azurewebsites.net to healthmantra.com . We are totally confused now . We don't know what exactly affected to our search traffic . Please Help us.
Technical SEO | | DivyaDubey0 -
Changing Domains - 301 old https to new https
Brief History: Our company made change to a new domain. Both domains had an SSL configured on it in which the old domain SSL was controlled and created by Shopify which gave us limited control. Because we couldn't redirect the old https:// to the new https:// So basically we duplicated our new HTML website and put canonical ref on all duplicate pages to the final domain to help get search to navigate to the newer domain. Question: In the near future I would like to take down the old domain and do a 301 domain forwarding. What is the correct course of action to complete this? Our old domain was indexed and SERP results were tied to it's https:// url's.
Technical SEO | | bnewt1 -
Duplicate content and 404 errors
I apologize in advance, but I am an SEO novice and my understanding of code is very limited. Moz has issued a lot (several hundred) of duplicate content and 404 error flags on the ecommerce site my company takes care of. For the duplicate content, some of the pages it says are duplicates don't even seem similar to me. additionally, a lot of them are static pages we embed images of size charts that we use as popups on item pages. it says these issues are high priority but how bad is this? Is this just an issue because if a page has similar content the engine spider won't know which one to index? also, what is the best way to handle these urls bringing back 404 errors? I should probably have a developer look at these issues but I wanted to ask the extremely knowledgeable Moz community before I do 🙂
Technical SEO | | AliMac260 -
Keeping external links after moving from http to https?
Hi, Does anyone have experience moving a website to https? I am about to do so. I have 84 linking root domains and around 2k+ external links. If i move a website to https will these links be lost? And how to keep these links? Many thanks, Dusan
Technical SEO | | Chemometec0 -
Should we dump the https from a client site?
We inherited a site that has both http and https. No e-commerce or data transfer...just html. Should we dump the https certificate? I think it might be causing issues with indexing and possible duplicate content. The https site has a certificate warning message...not good. The URL is www.charlottemechanical.com
Technical SEO | | theideapeople0 -
404 vs 301
My company is planning on discontinuing one of the product lines we currently offer. In terms of SEO, would it be better to implement a 301 redirect to a generic page page (such as the homepage or main product page), or to create a custom 404 page explaining that the product line with links to other pages (according to the most next viewed pages in Google Analytics). Thanks!
Technical SEO | | theLotter0 -
Do sites really need a 404 page?
We have people posting broken links to our site is this looking us link juice as they link to 404 pages. We could redirect to the homepage or just render the home page content, in both cases we can still display a clear page not found message. Is this legal (white hat).
Technical SEO | | ed1234560