#1
  1. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jul 2011
    Posts
    10
    Rep Power
    0

    Flat URL's (minus the .html at the end)?


    Hi,

    I have 2 question that I am really struggling with...

    A). How do you create a 'flat url' for example: example.com/example/ rather than having: example.com/example.html
    B). Does this help SEO?

    Thanks.
  2. #2
  3. Kansas City SEO PRO
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jun 2011
    Location
    Kansas City
    Posts
    164
    Rep Power
    61
    A. You would create a sub folder of your website and create an index.html in that sub folder. That would allow you to link to example.com/example which would be the same as example.com/example/index.html

    B. This doesn't really affect SEO in any way. Unless you want to segregate your linking strategies. For example you link relevant content to example.com/dogs and link other relevant content to example.com/cats. Then it could help.

    Comments on this post

    • joshz : No. A.) is completely wrong and far from proper.
  4. #3
  5. SEO Consultant
    SEO Chat High Scholar (3500 - 3999 posts)

    Join Date
    Apr 2010
    Location
    Atlanta, GA
    Posts
    3,605
    Rep Power
    1948
    Creating a subfolder for this task is a HORRIBLE idea.

    Just use your htaccess:

    With .htaccess under apache you can do the redirect like this:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)\.html$ /$1 [L,R=301]

    As for removing of .html from the url, simply link to the page without .html

    <a href="http://www.example.com/page">page</a>


    Source: .htaccess - How to remove .html from URL - Stack Overflow

    There's no benefit in an SEO value. Your URL's just look cleaner. Personally, I like the extensions, but it's all preference.

    Comments on this post

    • NewDelhiSEO agrees : yeah! thats the way to do it.
    Last edited by joshz; Jan 24th, 2013 at 08:48 AM.
    www.V2INTERACTIVE.net - SEO Web Design | On-Page SEO | SEO Audits & Reports | Link Building
    BASED IN ATLANTA, GA. Contact: Skype/Phone/Email (Discounted rates available for SEOChat members only - email seochat@v2interactive.net)
    Please EMAIL me at the above address and do not send Private Messages. I rarely check them and your message will be lost.
  6. #4
  7. the mango demon
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Nov 2009
    Location
    New Delhi
    Posts
    616
    Rep Power
    395
    You ask if a flat url like domain.com/page helps in SEO?
    No, it actually complicates it. Shocked?

    Now domain.com/page and domain.com/page/ might create duplication issues.
    some times if not properly handled it may lead to "404 not found errors".

    But if a rel=canonical tag is set and htaccess is properly handled flat URLs are far more cooler than domain.com/page.html

    Comments on this post

    • joshz agrees : Yep!
    SEO Professionals in NewDelhi It is different. Don't believe me? Go check yourself.
  8. #5
  9. Busting SEOChat Spammers!
    SEO Chat High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2009
    Location
    UK - Kent - Maidstone - PC!
    Posts
    3,754
    Rep Power
    1476
    I haven't used the above that Josh share, but this one works as its what I use on a couple of my sites:
    Code:
    # Rewrite .php to extensionless URL:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.php [NC,L]
    And no it will make no difference to your seo, usability or anything as search engines, servers and humans don't care about what extension your site is or isn't using. The extension is simply needed on the file so your web server knows how to process the information on the page.

    Its the same as your PC, you can tell it to hid or display your file type under your folder and search options, which makes no difference to how your PC works or what you think of the files you want to open.
    New To SEOChat? See Here & the FAQ's

    "stupid people say stupid things, and smart people out smart each other!" SOAD
    301 Redirects | SEO Tools | Default htaccess | CuteRank
  10. #6
  11. the mango demon
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Nov 2009
    Location
    New Delhi
    Posts
    616
    Rep Power
    395
    Nathanel,
    The code you shared does not do what the OP wanted to be done.
    Your code re-writes domain.com/page to domain.com/page.php
    We are talking about .html here. So Josh's code seems fine to me.
  12. #7
  13. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jul 2011
    Posts
    10
    Rep Power
    0
    Ok folks, thanks! I really appreciate the info! Wow! :-)
  14. #8
  15. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,210
    Rep Power
    979
    I would add that domain.com/page and domain.com/page/ are not the same.

    One is a request for a file called page
    The other is a request for a directory called page.

    On just about every web server, when you request a directory you get a directory index file served and that is nearly always a cascade of index.html, index.php etc.

    You do have to be careful that you get the correct response codes as mentioned.

    A further note on URLs - basically if you can request a file from any URL and it returns the same HTML code then it doesn't make much difference. There are some goofy things that can be done to confuse this issue but essentially its a pretty insignificant thing.

Similar Threads

  1. Minus 30 but no penalty
    By cristine01 in forum Google Optimization
    Replies: 2
    Last Post: Jun 7th, 2009, 10:48 PM
  2. Google Minus 50 penalties
    By AlexTampa in forum Google Optimization
    Replies: 12
    Last Post: May 27th, 2009, 07:19 AM
  3. Minus 69 and Proxy
    By Kezbiler in forum Google Optimization
    Replies: 1
    Last Post: Feb 29th, 2008, 06:12 PM
  4. Minus 30 because of alt text in banner
    By Robmuller in forum Google Optimization
    Replies: 3
    Last Post: Feb 1st, 2007, 07:32 AM

IMN logo majestic logo threadwatch logo seochat tools logo