Articles URL
-
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,
-
Well, you need to build some rewrite rules for that to work, it doesn't go automatically to the file querying the DB.
-
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-urlHow to fix this problem? Thank you for any help!
-
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!
-
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!
-
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
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
-
Best Tool for Retrieving Multiple URL Word Counts in Bulk?
I am doing some content analysis with over 200 URLs to go through! Does anybody know of, or can recommend any bulk on-page word count checkers which would help with the heavy lifting? Any suggestions are greatly appreciated. Thanks!
On-Page Optimization | | NickG-1230 -
I have lots of articles on my website. Should I add myself as the Author Rank for seo purposes
Hi All, We have lots of articles on our news page of our website. Should we add one of us as the author to gain Author Rank points so to speak ?.. Have not done anything previously with this but just wondered if we were missing a trick here thanks Pete
On-Page Optimization | | PeteC120 -
Best Way To Pass Rank To Follow Up Article?
What is the best way to pass rank to a follow-up article? For example, we write an article "Product A Rumors" that ends up ranking #1. When Product A is released, we write an article called "Product A Review". What is the best way to pass rank from the first pre-release article to the second post-release article? We don't want to do a simple 301 redirect as we want readers to be able to go back to the first article to see the progression of the Product A life-cycle. Also, should we go back and edit the old article to add a link to the new? Should we add a link in the new article to the old? Thanks in advance 😉
On-Page Optimization | | Humanovation0 -
URLs and folder structure for an E-commerce
Hi there !-) I´m helping a friend who has a e-commerce about nail polish in Brazil. I´m a little in doubt about the urls and folder structure. Two questions: 1. There are 10 products per category and 50 categories. Should I put them all in the root folder or creat 2 major categories ( 25 sub-categories each one)? 2. Whats the better product page url ( the store has around 500) nailpolish.com/IMPORT/BRAND/NAME-OF-THE-PRODUCT OR nailpolish.com/COMPLETE-NAME-OF-THE-PRODUCT Whats the best recomandation?
On-Page Optimization | | SeoMartin10 -
"Canonical URL Tag Usage" recommendation in SEOmoz "On-Page Optimization" Tool
Here comes another one related to SEOmoz "On-Page Optimization" Tool. The tool says the following about one of our pages: Canonical URL Tag Usage Explanation: Although the canonical URL tag is generally thought of as a way to solve duplicate content problems, it can be extremely wise to
On-Page Optimization | | gerardoH
use it on every (unique) page of a site to help prevent any query strings, session IDs, scraped versions, licensing deals or future
developments to potentially create a secondary version and pull link juice or other metrics away from the original. We believe
the canonical URL tag is a best practice to help prevent future problems, even if nothing is specifically duplicate/problematic
today. Recommendation: Add a canonical URL tag referencing this URL to the header of the page. Let's say our page is http://www.example.com/brands/abc-brand and on its header we'll place the following tag: Is this correct? I thought the canonical tag was meant for duplicates of the original page, for example: http://www.example.com/brands/print/abc-brand href="http://www.example.com/brands/abc-brand**?SESSID=123** Thanks in advance.0 -
URL Extensions (with or without??!!)
Hello, SEOers~ Today I have a question about URL extensions. Which one is more search engine friendly between URL with extensions and without extensions? e.g. URL with extension : www.example.com/tv/lcd.jsp URL without extension : www.example.com/tv/lcd I heard that URL without extensions is in trend considering user experience. User experience is also important but I would like to know from SEO perspective. Please people~ Help me out with this~! Thanks.
On-Page Optimization | | Artience0 -
Does a page's url have any weight in Google rankings?
I'm sure this question must have been asked before but I can't find it. I'm assuming that the title tag is far more important than the page's url. Is that correct? Does the url have any relevance to Google?
On-Page Optimization | | rdreich490 -
Seeking URL Advice
Hey Moz Community, I'm looking for some URL structure advice for a new directory of a website. We're trying to rank for the term 'internships abroad in <country>'</country> We have roughly 100 pages targeting specific countries. Right now the URL structure is www.gooverseas.com/internships-abroad/china, but some of my colleagues believe this structure would be better: www.gooverseas.com/internships-abroad/intern-in-china. I personally prefer the shorter structure, but we couldn't come to any agreement so we thought we'd pose the question to the community. Any thoughts? Thanks!
On-Page Optimization | | dunklea0