The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Https and 404 code that goes into htaccess

    Https and 404 code that goes into htaccess

    Technical SEO Issues
    1 1 135
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Manifestation
      Manifestation last edited by

      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

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      • Proper 301 redirect code for http to https
        TimHolmes
        TimHolmes
        0
        2
        23.4k

      • 422 vs 404 Status Codes
        AfroSEO
        AfroSEO
        0
        5
        874

      • What's Worse - 404 errors or a huge .htaccess file
        customerparadigm.com
        customerparadigm.com
        0
        3
        304

      • Htaccess code to 301 redirect a folder change
        Paul_MC
        Paul_MC
        0
        4
        160

      • What is the difference between 301 redirect to 404 vs just 404.
        SEO5Team
        SEO5Team
        0
        3
        3.3k

      • How to redirect the 404 errors to 404.php file
        GeorgeAndrews
        GeorgeAndrews
        0
        3
        501

      • .htaccess and error 404
        Probikeshop
        Probikeshop
        0
        9
        835

      • No Search Results Found - Should this return status code 404?
        bradkrussell
        bradkrussell
        0
        3
        5.1k

      Get started with Moz Pro!

      Unlock the power of advanced SEO tools and data-driven insights.

      Start my free trial
      Products
      • Moz Pro
      • Moz Local
      • Moz API
      • Moz Data
      • STAT
      • Product Updates
      Moz Solutions
      • SMB Solutions
      • Agency Solutions
      • Enterprise Solutions
      • Digital Marketers
      Free SEO Tools
      • Domain Authority Checker
      • Link Explorer
      • Keyword Explorer
      • Competitive Research
      • Brand Authority Checker
      • Local Citation Checker
      • MozBar Extension
      • MozCast
      Resources
      • Blog
      • SEO Learning Center
      • Help Hub
      • Beginner's Guide to SEO
      • How-to Guides
      • Moz Academy
      • API Docs
      About Moz
      • About
      • Team
      • Careers
      • Contact
      Why Moz
      • Case Studies
      • Testimonials
      Get Involved
      • Become an Affiliate
      • MozCon
      • Webinars
      • Practical Marketer Series
      • MozPod
      Connect with us

      Contact the Help team

      Join our newsletter
      Moz logo
      © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
      • Accessibility
      • Terms of Use
      • Privacy