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
-
Should I utilize URL re-writes to include keywords and other optimised page elements on my website?
Hi there, I am working on a medical recruitment website: https://wave.com.au/ I have noticed that our Job Search and Job Listings section of the website is lacking a little bit in terms of SEO optimisation. For example, at the moment this is our search page (with locum work type selected): https://wave.com.au/search-locum/results If you add a location, for example, NSW and then click search again, it updates the URL to: https://wave.com.au/search-locum/results?LocumSearchForm_Location[]=NSW&action_doSearch=Search+jobs I did a check what some competitors and leaders in the recruitment industry were doing and I came across: https://www.ochrerecruitment.com.au/jobs/anaesthetics/new-south-wales/locum/ If you click the different filters/options, it updates the URL to include more clearly defined categories. Some websites would even have a H1 heading tag that would update based on the filters/options you selected. Should I set up a set of URL re-writes and re-structure my website a little bit so that dynamic URLs change to static etc.? Does anyone have any best practice knowledge in regards to this? I have been referencing the following article: https://moz.com/blog/dynamic-urls-vs-static-urls-the-best-practice-for-seo-is-still-clear
On-Page Optimization | | Wavelength_International0 -
City Name in URL structure
I have a client whose site was built when they only served one market, and they now have that city in the majority of their URLs. I'm suggesting we redo the URL structure to remove this location from the main URLs (think homepage, about, etc.) since they have now expanded to three markets. They are seeing a lot of great organic traffic in that original market but are struggling in the new ones they've added so I'm helping to optimize their site. How critical do you think that removing that location from the URL is? I know we would need to implement 301 redirects, but wanted to get thoughts on this.
On-Page Optimization | | maghanlinchpinsales0 -
URL, Breadcrumb/Site Hierarchy Display, User (and Bot) Expectations
TL;DR: Do parts of URLs that are used throughout the web quite consistently have any influence on robots (or users)? Are there any studies? What would you use for pages that are something between a tag-page and a wiki-like article? Long version: On a site with a lot of content, I decided to go for tags to present articles on that topic together. My first thought was to simply list those under the URL /tag/{Tag_Name}. Short. Simple. Grabs the core meaning - on this page you'll find stuff about the tag. But: those tag-pages will be more than just lists of the tagged pages (let's say they are articles on various topics and products with certain attributes and the same tag can apply to a product and an article). The tag pages themselves will often talk a lot about the use of said tag - extensively, without blabbering. It is aimed at being a landing page and hub for the tag/keyword. Having this in mind, I pondered using /wiki/. It does fit in some respects, but it really is not a wiki. /info/, /lexicon/, /knowledge/ and other ideas came to mind but the more I thought the weirder I did find most ideas. What I am now wondering: Do these parts of URLs (/tag/, or /product/, or /wiki/) that are not really keywords in most cases have any influence on search engines? They are used quite consistently across the web and therefore could be used as signals. I suspect, though, that they might have more influence on shaping user expectation. (If I see /wiki/ in an URL or site hierarchy display (breadcrumb), I expect ... well, a wiki-style page; if I see /tag/ I expect a collection of stuff with that tag.) What would you chose if it is not quite a tag, nor quite a wiki but something in-between? Or do you think it does not matter at all? (Breadcrumbs will be used and google has used them for display in just about all SERPs.) Are there perchance any studies concerning these parts of URLS? Regards Nico
On-Page Optimization | | netzkern_AG0 -
Is there benefit to having longer article headlines?
I am seeing a trend in digital publishing on sites like HuffPo and others where they are increasing the length of article headlines to 3-4 rows of large type, often containing multiple sentences. Other publishers like CNN.com still have shorter headlines and character counts. Perhaps this is just a design aesthetic, but I am curious if there is any SEO value to having longer headlines assuming you are able to fit your targeted keywords/terms and message in something shorter?
On-Page Optimization | | barberm0 -
The value of changing URL structure
Dear Moz members, There have been many questions on this forum on this topic but I cannot find one that completely answers my question. We launched our new website about 7 months ago and the website contains around 3.000 product pages. The average page authority of the product pages is quite still quite low (12). The URL structure is built like this: www.website.com/catalog/ID/productname/ (with right keywords in the product name). So e.g the current URL is Our competitors rank higher on certain keywords while page authority (and DA) are significantly lower. Their URL structure is set up like this: www.website.com/productname/. Our most import keyword is "grafmonumenten" and the link we would like to rank on is: https://www.denhollandsche.nl/grafmonumenten/ My question now is:
On-Page Optimization | | stepsstones
1: how important is the length/depth of the URL structure?
2: is it beneficial for us to change the structure (www.website.com/productname/) use permanent redirects? My expierence is that changing the 'page url' can cause a short term drop in the serps, but can have positive effects on the longer term. Thanks for helping me out!0 -
H1 Tags for Articles in Blog Category - confused ;-(
Dear Seomoz community This is my first post here. Until now I was only browsing the Q&A and learned a lot just by reading the existing topics. Since we launched our website with a new design last week I started to heavily use Seomoz to track down missing tags, descriptions and other on page issues. Just out of curiosity I checked the page outline of the Seomoz blog. I was really surprised! Seomoz uses only H1 tags on their blog main page. Each article is wrapped in an H1 plus the blog title. I am a total SEO beginner but until today I was thinking that using several H1 tags on one page is not optimal. We use one H1 tag on our site for the magazine category description (for example http://www.siam2nite.com/magazine ) and then for the articles H2. So my question. Should I change my H2 to H1 for the magazine articles like Seomoz did? Would really appreciate your advise on this Regards, Menelik
On-Page Optimization | | menelik0 -
Do a lot of related articles in lower subfolders, boost higher level subfolder keywords?
For instance www.example1.com/cooltopic/ has 5 ‘verycool articles’ under /cooltopic/ www.example1.com/cooltopic/verycool-article1/ , www.example1.com/cooltopic/verycool-article2/. On www.example2.com/cooltopic/ there are 100 ‘verycool articles’ Who will rank above the other for the term ‘cooltopic’ in the SERPS? Is it www.example1.com with 5 ‘verycool articles’ or www.example2.com with 100 ‘verycool articles’. Or does the quantity of (theme related) articles in subfolders not matter? And what if example1.com has more quality external links from the ‘awesome community’. Would this change a lot in the rankings? Or what if both domains have 0 external links, but example2.com has 95 more internal links (from the articles) to /cooltopic/ than example1.com with only 5 articles.
On-Page Optimization | | PrizeWize0 -
How do I get this program to see url with www. and with out www the same
The program is showing pages with www. as a differant page from a page with out the www. first, this is showing up as duplicate pages when they are the same page, how do I filter this?
On-Page Optimization | | masterplumbertom0