The correct way to go from PHP site to HTML site?
-
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!
-
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 -
"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.
-
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.
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
-
Why i my site not ranking
I have been building my website www.ubodo.com ( its a property portal ) I have feeds coming in from nearly 200 estate agents and I have just over 26k properties listed all over the world. I have tried to make the site fast, mobile friendly and followed several SEO tutorials but I am looky If I get 10 new visitors a day !!! I have managed to get 1st page ranking for terms like " Property for sale in Hambye" ( less competitve than " Property for Sale in France " ) Can any one see anything obvious I have done wrong, I feel like there is a switch to turn on the traffic and I cant find it. Any help would be greatly appreciated Barry
On-Page Optimization | | Bazconnolly10 -
Tracking down rel="canonical" on Wordpress site
A rel="canonical" is being added to every page and post on my Wordpress site - not tag results, not category results. Not a major problem, right? Except that I don't know where it's coming from. I've tried tracking it down - change the theme back to a default one, turn off all the plugins - it's still there. Is it coming from .htaccess perhaps? The only issue it is causing is that it has causes me to have to turn off the canonical option in Platinum SEO as that was resulting in two identical rel=canon on each page. It doesn't seem to be causing problem but I'd like to get a better understanding of what it going on.
On-Page Optimization | | robandsarahgillespie0 -
How do I reduce the amount of internal links on my site?
Hi, Can someone help me with reducing the amount of internal links on our site please? https://www.thepresentfinder.co.uk Thanks Charlie
On-Page Optimization | | The-Present-Finder0 -
Site Structure. Which is better?
Ideally, which model is better for site structure: 1. Homepage -> Categories -> Individual Pages (See example here http://www.wordtracker.com/attachments/bead-site-structure.gif) OR 2. Homepage -> Categories -> Sub-categories -> Indicidual Pages In the 2nd model, are the individual pages too far away from the homepage?
On-Page Optimization | | brianflannery0 -
Spanish version of site - best practice?
I need to create a Spanish version of an existing site. My idea was to have the Spanish content switch out the English content if the query string had something like ?l=es. It would also drop a cookie so that all other pages would switch out content as well. I do want the Spanish content to be indexed and rank in the search engines, though. I would include all of the Spanish versions (with the ?l=es) in the site map and link to them on every page with a link to the Spanish version. Does anyone have any experience with this? Is this a bad idea? Thanks! Tom
On-Page Optimization | | TomBristol0 -
Canonical Tag for Ecommerce Site
I implemented a canonical tag on each product page for my clients ecommerce site and my rankings tanked. Has this happened to anyone else? If so, when can I expect rank to return?
On-Page Optimization | | DynoSaur0 -
Checking for content duplication against content on your own site.
We are currently trying to rewrite our product descriptions and I'm afraid some of the salespeople that are writing the descriptions are plagiarizing one-another's writing. Is there a content duplication checker that will allow you to check a piece of writing against a specific site rather than all of the web?
On-Page Optimization | | MichealGooden0 -
301 Redirect to mobile site effecting rankings
On my site I redirect users when on a mobile device to be redirected to my mobile version of my site. In the last couple weeks I added that redirect in my htaccess file. I just realized today that I am doing a 301 redirect. In the last few weeks my ranking have gotten lower. I am starting to think that because of the redirect my mobile site is not as optimized as my regular site and therefor is effecting my rankings. My question is how can I redirect my users to my mobile site but not use a 301 AND how do I get google to use my main site content for ranking on the mobile side. I want to go back to getting my search rankings on the mobile side using my main sites content. Can I simply remove the 301 on the redirect? Hope that makes sense.
On-Page Optimization | | cbielich0