ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SEO, url segments, 301 redirect

December 08, 2007 1:41pm

Subscribe [3]
  • #1 / Dec 08, 2007 1:41pm

    django6

    124 posts

    Hello,

    We’ve been looking into how URLs affect search engine optimization and haven’t been able to get a definitive answer on whether or not the content of the url matters in a search. From what I’ve read in the EE docs, it looks like EE was designed to make the urls more readable, but I’m not sure if that design also helps search optimization.

    Here are the issues that are driving this question:

    1. We’ve been using google analytics and some other SEO products to determine what keywords for a specific site are the most searched. As of now we’re adding those to our h1 and page titles.

    2. On pages that have weblogs we’re also including the title of the weblog in the h1 and page titles since that regularly changing content is supposed to improve search ratings.

    3. We’re now considering using 301 redirects to change the url structure so that it also includes more highly searched words. This is where we’re unsure if this will improve search ratings and/or cause other problems we’ve not considered.

    4. What’s a good way to handle an EE rebuild of an existing site that’s not built in EE so that we don’t break any bookmarks that people already have? Is this a good place for 301 redirect or is there another way to handle this?

  • #2 / Dec 08, 2007 5:31pm

    mayest

    293 posts

    You will need to use 301 redirects in .htaccess in order to let the search engines know that the pages have been permanently moved, and you won’t lose any PR. That will also ensure that your user’s bookmarks won’t break. With some clever regex you can minimize the number of RewriteRule calls that you need.

    My understanding is that the URL does matter in SEO. I’m new to EE, but it seems pretty good on this score. You will always have the template group name and the template name in the EE-generated URL (unless you are using the “Pages” module, I guess). So, template group names and the names of the templates within are a great SEO opportunity. Choose those names carefully, and create as many template groups as you need instead of cramming everything into one group.

    Also keep in mind that the <title> and <meta name=“description” content=” “> tags in your HTML header are very important. I store those in custom fields in each weblog entry and then pass them as embeds to my .html_head_tag template which is pulled into each of the other templates. That way the title and description are always correct.

  • #3 / Dec 09, 2007 4:10am

    Kellankade

    54 posts

    While at wordcamp this summer Matt Cutts of Google did state at URLs did make a difference in SEO. He also stated in the past the google spider would treat URL_LIKE_THIS as URLLIKETHIS. So the way around that was to use dashes instead of underscores. He did say that google did fix this issue with their spider but to his knowledge other search engines did not. So he suggested that you use dashes/

  • #4 / Dec 09, 2007 11:31am

    django6

    124 posts

    So here’s what I think you are all suggesting:

    1. Use separate template groups for each new area/page of the website.
    2. Name each template group using titles that are search friendly and include dashes such as: /some-good-seo-template-group-name/
    3. Only use 301 redirects to link the pages of an existing site to the new urls, avoiding any broken bookmarks and loss of past customers.

    Does this make good sense?

    One issue I have with using the template names to get the best search friendly url is that often times I’ll have to change them after the web site is constructed. My boss will come back after doing a keyword analysis and want to rename all the titles, headers, meta tags,and urls. Is there any quick way to change template group names? I haven’t found a way to change the name of templates/template groups in EE, it seems you have to copy the original to a new name and delete the old one. Then you have to go through all the links and change them to the new name. I guess that’s not that big of a deal…

    I’m trying to learn a little more about the purpose of a 301 redirect. I general, when should I use a 301 redirect?

  • #5 / Dec 09, 2007 2:55pm

    mayest

    293 posts

    Your plan sounds about right to me. However, you don’t need a new template for each “page”, just for each weblog. The URL for the page will come from the URL Title that you enter when you create a new weblog entry. That allows you to have a single template for each weblog.

    For example, my site (among other things) has calculator tutorials. I have a template group named calculators, and within that I have a template for each model of calculator (e.g, hp12c). So, I end up with URLs that look like:

    http://www.example.com/calculators/hp12c/hp12c_page2

    Except for the underscore in the file name, I think that is quite SE friendly. The underscore is due to an unfortunate decision that I made when I first created the site and didn’t understand the point that Daniel mentioned (though I think Google is moving towards treating underscores them same as dashes). Keeping that underscore, for now, simplifies the 301 redirects. Note that I am also using .htaccess to drop the index.php from the URL.

    Right now, I’m developing the EE version of the site on another domain, but when it is done I’ll just switch the domain names and then the .htaccess files will redirect to the correct URL. My old URLs on the static site look like this:

    http://www.example.com/hp12c_page2.html <—in the root directory

    and I am redirecting to:

    http://www.example.com/calculators/hp12c/hp12c_page2

    using this rule in .htaccess:

    RewriteRule ^(hp[1-9][0-9][b|c])(_page[1-9])\.html$ /calculators/$1/$1$2 [R=301,L]

    That rule will redirect all of my HP pages (i.e., hp10b, hp12c, hp17b, or hp19b). I use a similar rule for other brands. At some point in the future (in a year or two), I can clear the redirects from the .htaccess file.

    Tim

  • #6 / Dec 09, 2007 4:35pm

    django6

    124 posts

    I actually said template group not template. For my last two sites, which only had one look, I used only 1 template for the entire site and passed that single template the variables for only the content that changes. But I do have a new template group for each of the different static areas. So, for instance, if I have a navigation bar that has: home, history, about us, directions, blog, etc. I’d have template groups with those corresponding names. The index file of each of those groups then just has a single line that embeds the global template and passes it the variables that changed using embedded variables.

    So all my urls would look like:
    http://www.mysite.com/index.php/home
    http://www.mysite.com/index.php/history

    and if there’s a weblog
    http://www.mysite.com/index.php/history/name_of_blog

    Using the 301 redirect to remove the “index.php” is interesting to me. Do you think that removing it has any SEO advantage?

  • #7 / Dec 09, 2007 5:23pm

    mayest

    293 posts

    Using the 301 redirect to remove the “index.php” is interesting to me. Do you think that removing it has any SEO advantage?

    Good question, and I don’t know the answer. However, removing index.php does, in my opinion, make the URL more user-friendly. It also has the advantage of hiding the technology that you are using. If it is there, then people know that you are using PHP to drive the site. That probably doesn’t matter much, and I’m sure the hackers would figure it out anyway.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases