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
      • Hi anyone please help I use this code but now getting 404 error. please help.
        roynguyen
        roynguyen
        0
        6
        57

      • Crawl errors - 2,513 not found. Response code 404
        bridget.randolph
        bridget.randolph
        0
        3
        85

      • Proper 301 redirect code for http to https
        TimHolmes
        TimHolmes
        0
        2
        23.4k

      • My 404 page is returning a 404
        CleverPhD
        CleverPhD
        0
        7
        114

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

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

      • Status code 404??!
        Francisco_Meza
        Francisco_Meza
        0
        3
        410

      • Non-www to www code not working in htaccess
        JaspalX
        JaspalX
        0
        4
        667

      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