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. On-Page / Site Optimization
    4. The correct way to go from PHP site to HTML site?

    The correct way to go from PHP site to HTML site?

    On-Page / Site Optimization
    4 3 108
    • 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.
    • reliabox
      reliabox last edited by

      I have a website fully coded in PHP and I am doing a re-design over to an HTML site. I searched through the Q&A and there were some conflicting answers. Some said you will need to 301 all the pages. Others said to use the .htaccess to parse all the files as html.

      What is the correct way I should go about this?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Cocoonfxmedia
        Cocoonfxmedia last edited by

        I personally think you can keep the PHP.  The only reason I can see changing to HTML site is if you don't have a CMS system running.  I would 301 redirect the old pages to the new.

        reliabox 1 Reply Last reply Reply Quote 1
        • reliabox
          reliabox @Cocoonfxmedia last edited by

          "I personally think you can keep the PHP.  The only reason I can see changing to HTML site is if you don't have a CMS system running"

          The new site is already coded in HTML though - Is there just some code I can add to .htaccess to tell spiders that all PHP are not HTML?

          Obviously I will need to change any internal/external links to the new extension. I want to make sure I cover all my bases and do this properly.

          1 Reply Last reply Reply Quote 0
          • MikeTek
            MikeTek last edited by

            Hi James,

            As Cocoonfxmedia noted, it depends a good deal on your CMS situation.

            For SEO purposes, there's no difference between PHP and HTML - search engines don't encounter PHP code, it occurs on the server and then the server sends the search crawler the HTML output.

            I'd have to see the site in question to understand what would have to happen from a SEO standpoint to ensure things carry over smoothly, but in general I'd recommend focusing on ensuring that any page URLs that are linked to from other websites (Open Site Explorer is a good way to check on this) are 301 redirected to their best replacement URLs on the new site.

            301 redirecting every single URL is not necessary. I'd focus on the URLs that have links from external websites. Search engines will adjust properly for the other pages, dropping the old URLs once they get a 404 error and finding/indexing the new pages from the top-level pages.

            Best,
            Mike

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • The correct way to rel=canonical
              KevnJr
              KevnJr
              1
              3
              124

            • To avoid the duplicate content issue I have created new urls for that specific site I am posting to and redirecting that url to the original on my site. Is this the right way to do it?
              0
              1
              24

            • HTML Site SEO (NO CMS)
              ArthurRadtke
              ArthurRadtke
              2
              7
              442

            • Index.php + external site added to end of URL
              drkevinhogan
              drkevinhogan
              0
              3
              1.6k

            • Website redesign: site going from .php to .html
              anthonytjm
              anthonytjm
              0
              2
              361

            • Hi, we are considering a new site revamp to go live in 3-4 months. How much effort should we put into fixing what is wrong with our current site? We are a new SEOmoz user. Thanks
              Chenzo
              Chenzo
              1
              10
              356

            • Best way to optimize site for Google Maps?
              MiriamEllis
              MiriamEllis
              0
              5
              566

            • How deep should I go with a directory site?
              AlanBleiweiss
              AlanBleiweiss
              0
              2
              874

            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