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
-
Should Ecommerce Site Give Registration Option to Customers?
Hi All, Should Ecommerce Site Give Registration Option to Customers? What are then advantages and disadvantages? Thanks!
On-Page Optimization | | Arnold31 -
Removing non www and index.php
Hi, I'm green when it comes to altering the htaccess file to remove non www and index.php. I think I've managed to redirect the urls to www however not sure if I've managed to remove the index.php. I'm pasting the contents of the htaccess file here maybe someone can identify if I have unwanted lines of code and if it is up to standard (there are a lot of comments in #) not sure if needed but I've left them as I don't want to screw up anything. Thanks 🙂 @package Joomla @copyright Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. @license GNU General Public License version 2 or later; see LICENSE.txt READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE! The line 'Options +FollowSymLinks' may cause problems with some server configurations. It is required for the use of mod_rewrite, but it may have already been set by your server administrator in a way that disallows changing it in this .htaccess file. If using it causes your site to produce an error, comment it out (add # to the beginning of the line), reload your site in your browser and test your sef urls. If they work, then it has been set by your server administrator and you do not need to set it here. No directory listings IndexIgnore * Can be commented out if causes errors, see notes above. Options +FollowSymlinks
On-Page Optimization | | KeithBugeja
Options -Indexes Mod_rewrite in use. RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.php/
RewriteRule ^index.php/(.*) /$1 [R,L] Begin - Rewrite rules to block out some common exploits. If you experience problems on your site then comment out the operations listed below by adding a # to the beginning of the line. This attempts to block the most common type of exploit attempts on Joomla! Block any script trying to base64_encode data within the URL. RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR] Block any script that includes a0 -
Multilingual site with untranslated content
We are developing a site that will have several languages. There will be several thousand pages, the default language will be English. Several sections of the site will not be translated at first, so the main content will be in English but navigation/boilerplate will be translated. We have hreflang alternate tags set up for each individual page pointing to each of the other languages, eg in the English version we have: etc In the spanish version, we would point to the french version and the english version etc. My question is, is this sufficient to avoid a duplicate content penalty for google for the untranslated pages? I am aware that from a user perspective, having untranslated content is bad, but in this case it is unavoidable at first.
On-Page Optimization | | jorgeapartime0 -
Index.php + external site added to end of URL
Good day, I have a domain http://www.ecofriendlylink.com. I am trying to resolve the Crawl Diagnostic errors on it. I have several Duplicate Page Content errors. Example 1: (The domain happynewyou is not mine, some Comments from them have been placed on my site. Ecoshop.php is a page on my site). URL: http://www.ecofriendlylink.com Duplicate Page Content: http://www.ecofriendlylink.com/www./happynewyou.com/ecoshop.php Referrer: None. Example 2: URL: http://ecofriendlylink.com/index.php Duplicate Page Content: http://www.ecofriendlylink.com/index.php http://www.ecofriendlylink.com/www./happynewyou.com/index.php Referrer: http://ecofriendlylink.com/ Example 3: is a different problem, but still a Dup Page Error. URL: http://ecofriendlylink.com/water.php Duplicate Page Content: http://www.ecofriendlylink.com/water.php Referrer: http://ecofriendlylink.com/ water.php is a page on my main domain. The www version and the non-www version, if this a problem and something I need to overcome? So please can you advise what I need to do to get rid of this strange external domain name + index.php (as per examples 1 + 2), and explain what I'm doing wrong with Ex 3. Thank you!
On-Page Optimization | | drkevinhogan0 -
Suggestions on plans to optimize my site? (NOOB)
I am currently trying to plan how to optimize my site based on keywords. I read and I understand site architecture and usability http://www.seomoz.org/blog/site-architecture-for-seo , but I am still somewhat confused about how to target each keyword per page or when http://www.seomoz.org/img/upload/splitting-keyword-targeted-.gif Let me give you an example. We build databases for SME's using 3 different technologies. One of them is MS Access. Based on PPC campaigns and keyword research some of the possible keywords might be ms access programmer ms access consultants access database experts According to the link provided, should these be separate pages? I feel if they were, our site nativigation would be cluttered and clients would not be benefiting from them at all. It might even lead to some redundant data which I believe is bad right? My feeling is to make one page and target one keyword, but I'm not sure. For example, see one of our top ranking competitors http://www.justgetproductive.com/content/access-programmer/index.php Please, look at the footer? Is that actually how I should structure my links? I hope the answer is NO! Then again, if I do just have one page targeting one keyword, what do I do about the others? Do I just try to use blog posts/articles addressing those keywords? Do I not target them at all? Thanks for any advice, please keep in mind I am just getting started. My approach is to create a plan to outline everything before I put a lot of time into it.
On-Page Optimization | | emcacace1 -
Do you handle website on-page/site optimization?
Our website is gaining traction and we are looking for an individual who is an expert at examining websites to see if the structure and on-page optimization is being optimized, and what. Please contact me if you are interested. Thank you.
On-Page Optimization | | balboafinance0 -
I changed my site from HTML to PHP and I need to get some help.
Ok...so the other day I went from HTML to PHP in every part of my website. I want to know the best option for me for redirecting my pages from HTML to php. I had my site scanned with SEOMoz and I was given many 404 errors which is not at all good. I do not have any pages of my site linking to any of these html pages. All of the site links have been updated. I have checked 3 times. I have never created a robots.txt file so I would love to get a little help with this part. I was thinking it would be best to tell Google not to worry about these pages in the file. I kept the pages up and I plan to remove all code with them so that no content shows up if someone visits but the issue with that is my site is already indexed as HTML. I want to have the HTML pages redirect to the PHP without worrying that my visitors will land on my site via Google onto an HTML page. I hope I am making sense. What is the best advice you can give me. I need all pages to redirect to PHP. I used an htaccess redirect from all HTML to PHP but when I get so many of them added I get an error on my site saying too many redirects. Seriously need help.
On-Page Optimization | | TrendyHost0 -
Too many on page links on ecommerce site
I have an online store with 10 catagories, many of those have subcategories. I have a tree style navigation menu on the page. This helps people quickly find what they need. However, I end up with about 125 links on the page that way. Does google really penalize me for this? Is there anyway around this? Advice much appreciated!
On-Page Optimization | | bhsiao0