SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pros and cons for both SEO and numbered URL

    What are the pros and cons about having SEO URL? What are the pros and cons about having a regular numbered URL?
    I want to know because user friendly URL aka SEO URL are being used a lot now.
    I've always seen something like this

    http://domainhere.com/blog/article.php?id=123456

    But then a typical person wouldn't know what the article is about, but if you see something like this

    http://domainhere.com/blog/blog_animal_article

    You would know that the article is about animals. Give me examples of both pros and cons about having both SEO and numbered URL.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,333
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    I can't think of any circumstance where the numbers would be better than actual 'keyword' text.

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,893
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ralph.m View Post
    I can't think of any circumstance where the numbers would be better than actual 'keyword' text.
    Tweeting, sharing, printing, re-typing - I frequently get frustrated with long, wordy URLs that need to be typed in full, which are hopeless if you are wanting to include them in any material that might be printed. I don't like using third party shorteners because I think they look unprofessional and the reader then has no clue where the link will take them. At least if you can see what the domain is, you've got a better chance of knowing whether it's likely to be of interest. And there are also times when you might not want to, or be able to, enforce unique page names - such as here on SPF!

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,333
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Good examples … although I was thinking in terms of SEO, rather than convenience in other respects.

  5. #5
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,680
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    tr,

    Years ago, I created a website for a client who wanted SEO URIs and it's been operating great for those years.

    Personally, I loathe the query string using a numeric ID because that tells visitors (hackers) too much about how to target the website ... not to mention the simple fact that visitors don't know what they're linking to.

    Go have a look at the website http://wilderness-wally.com.

    Oh, the downside to SEO URIs is it that the client knows what characters are not acceptable in a URI AND that each article's title must be unique (it's enforced by the database).

    ID's are auto-incremented and are unique keys, too, but they convey nothing to the visitor except the name of your file handler, your language (PHP in your case) and the fact that the database is accessed by numeric IDs.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  6. #6
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,904
    Mentioned
    74 Post(s)
    Tagged
    7 Thread(s)
    >>> Give me examples of both pros and cons about having both SEO and numbered URL.

    I first started with numbered URLs before I converted the site to "meaningful titles".

    After the upgrade a considerable number of numeric backlinks were showing 404's. Solution was to catch the numeric and 301 to the
    "meaningful titles".
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  7. #7
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,680
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    John is quite correct!

    Rather than build a massive .htaccess file (because it must be loaded and parsed multiple times for EVERY request), though, I'd use an ErrorDocument handler script to read the database for the ID and generate a redirection to the "meaningful title" (replacing spaces and other reserved/illegal characters) with a 301 status (that takes TWO PHP statements).

    Good pick-up, JB!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  8. #8
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. This is very helpful. So there's the fight between which one should be used.
    Late last year, I was building myself a simple forum script and when I got to the pagination. I got it to work, but then I started seeing that SEO URLs were being used so I tried to convert my numerical URLs to SEO URLs and I found that my pagination wouldn't work with the SEO URLs. So I decided to change the forum script entirely. I'm also using SEO for SEO usernames. The SEO usernames works fine.

    I would like to know which type of URLs should I use for my simple forum if I was to go back and redo the whole thing to make it user friendly.

  9. #9
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,904
    Mentioned
    74 Post(s)
    Tagged
    7 Thread(s)
    Therockers, take a look at this threads URL.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  10. #10
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    Therockers, take a look at this threads URL.
    Yes I do see that. I have a similar URL.
    Mine would look like

    http://localhost/forums/category/1/General-Discussions

    This is my .htaccess

    Code:
    RewriteRule ^category/([0-9]+)/([-a-zA-Z0-9_]+)$ category.php?id=$1
    And then I basically just fetch the ID from http://localhost/forums/category/1/General-Discussions
    The 1 being the id and General-Discussions is the category name. I replace spaces and special characters with dashes.

    For numerical URLs, I do the typical fetch in PHP and no Apache.
    I just want to know which one is more effective in the long run.

    Will http://localhost/forums/category/1/General-Discussions or http://localhost/forums/category.php?=1 be most best in your eyes?

  11. #11
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,904
    Mentioned
    74 Post(s)
    Tagged
    7 Thread(s)
    @therockers,


    If possible I would be tempted to remove category since I think it is ignored by search engines and use the following: "http://localhost/forums/1/General-Discussions"


    I do not like the $_GET style because they are meaningless to a user and far better to use SEO friendly keywords.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  12. #12
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    @therockers,




    If possible I would be tempted to remove category since I think it is ignored by search engines and use the following: "http://localhost/forums/1/General-Discussions"


    I do not like the $_GET style because they are meaningless to a user and far better to use SEO friendly keywords.
    Alright thanks. That's good to hear that you also like SEO URLs. I want more people's opinion on this before I start using SEO permanently.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •