The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. On-Page / Site Optimization
    4. Articles URL

    Articles URL

    On-Page / Site Optimization
    6 3 126
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JohnHuynh
      JohnHuynh last edited by

      Hello,

      Currently, I am parsing article base on article ID on URL request. For example:
      To go to the content of article **What is the visa on arrival? How to get it? **I am using URL like that http://www.vietnamvisacorp.com/news/what-is-the-visa-on-arrival--how-to-get-it--245.html and base on ID 245 to get this page content. 
      But, now I want to optimize this URL to http://www.vietnamvisacorp.com/news/what-is-the-visa-on-arrival--how-to-get-it.html. Then I got a problem: How to get an article without ID?

      Thanks,

      1 Reply Last reply Reply Quote 0
      • MatthewBarby
        MatthewBarby last edited by

        Hi John,

        This depends on what CMS you are using (if any). If you're using WordPress then you can do this pretty easily by using a search engine friendly URL permalink (which you can often get plugins for on most CMS's).

        Let us know what platform you are working on and it will be easier to diagnose.

        Matt

        1 Reply Last reply Reply Quote 1
        • JohnHuynh
          JohnHuynh last edited by

          Hi Matt,

          Thanks for your contributions. I don't use WordPress. We developed out website with python and django framework. My problem here: I could not map one-to-one from URL /what-is-the-visa-on-arrival--how-to-get-it.html with that page content in database. Please give me advice!

          FedeEinhorn 1 Reply Last reply Reply Quote 0
          • FedeEinhorn
            FedeEinhorn @JohnHuynh last edited by

            While don't getting the page URL (which is the article title "what-is-the-visa-on-arrival-how-to-get-it.html" remove the .html and then add an extra field to the DB with a the URL friendly name, for this article, that field will contain "what-is-the-visa-on-arrival-how-to-get-it" then you search your DB for that field and you get the entry ID (of course, adding an index to that new column).

            This one is a good solution for small DBs, but when scaling, you may want to use an integer to get the post ID instead, say "http://www.vietnamvisacorp.com/news/245/what-is-the-visa-on-arrival-how-to-get-it.html"

            You get the ID plus the title and avoid any issue that may come if you accidentally post an article with the same title (you can have this prevented by looking into the DB before saving the article and if the title exists, you can either change the title or add something to differentiate them, say "-2".

            Hope that helps!

            1 Reply Last reply Reply Quote 1
            • JohnHuynh
              JohnHuynh last edited by

              Hello, 
              My google webmaster reported that this URL http://www.vietnamvisacorp.com/news/245/what-is-the-visa-on-arrival-how-to-get-it.html is NOT FOUND and link from http://moz.com/community/q/articles-url

              How to fix this problem? Thank you for any help!

              FedeEinhorn 1 Reply Last reply Reply Quote 0
              • FedeEinhorn
                FedeEinhorn @JohnHuynh last edited by

                Well, you need to build some rewrite rules for that to work, it doesn't go automatically to the file querying the DB.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Making Shopify URL's Simpler - Losing the words 'collection', 'product' and 'page' in a Shopify store URL. Any advice?
                  0
                  1
                  171

                • Which page will rank higher, my main article or the sub article linking from it?
                  Leebi
                  Leebi
                  0
                  5
                  68

                • URL Keywords
                  abdulw
                  abdulw
                  0
                  3
                  341

                • To avoid the duplicate content issue I have created new urls for that specific site I am posting to and redirecting that url to the original on my site. Is this the right way to do it?
                  0
                  1
                  24

                • Our urls for adwords are slightly different from current urls presented on site (weused htaccess to help create shorter urls). How important is it that the adwords url match the sitemap url for keywords on those pages?
                  LesleyPaone
                  LesleyPaone
                  0
                  2
                  134

                • Optimize URL
                  JohnHuynh
                  JohnHuynh
                  0
                  4
                  113

                • URL parameters
                  Martijn_Scheijbeler
                  Martijn_Scheijbeler
                  0
                  2
                  74

                • Recommendation: Add a canonical URL tag referencing this URL to the header of the page.
                  ThompsonPaul
                  ThompsonPaul
                  0
                  7
                  1.5k

                Get started with Moz Pro!

                Unlock the power of advanced SEO tools and data-driven insights.

                Start my free trial
                Products
                • Moz Pro
                • Moz Local
                • Moz API
                • Moz Data
                • STAT
                • Product Updates
                Moz Solutions
                • SMB Solutions
                • Agency Solutions
                • Enterprise Solutions
                • Digital Marketers
                Free SEO Tools
                • Domain Authority Checker
                • Link Explorer
                • Keyword Explorer
                • Competitive Research
                • Brand Authority Checker
                • Local Citation Checker
                • MozBar Extension
                • MozCast
                Resources
                • Blog
                • SEO Learning Center
                • Help Hub
                • Beginner's Guide to SEO
                • How-to Guides
                • Moz Academy
                • API Docs
                About Moz
                • About
                • Team
                • Careers
                • Contact
                Why Moz
                • Case Studies
                • Testimonials
                Get Involved
                • Become an Affiliate
                • MozCon
                • Webinars
                • Practical Marketer Series
                • MozPod
                Connect with us

                Contact the Help team

                Join our newsletter
                Moz logo
                © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy