Automate process for naming page titles?
-
Hi everyone,
I'm new to the Moz community, but really loving it. I'm hoping some of you more experienced experts may be able to answer what is probably a pretty basic question.
I'm working for a non-profit client and I used the SEOMOZ tool to run a report on their site errors. I learned that the website has 5,432 duplicate page titles. They had their website redesigned last year before I started working with them and it appears that the developers didn't take into a account the need to provide unique page title names to each page.
While it may make sense to go in to add custom page titles to a handful of the pages for the site, the vast majority of the pages are allocated to products (e-commerce). Is there a script that the developers could add that would automatically add page unique page titles based on say, the title of the product?
Here are a few URLs to help you get a sense of what we're dealing with.
homepage: www.creativityexplored.org
example level two page: http://www.creativityexplored.org/artists/douglas-sheran
example product page: http://www.creativityexplored.org/shop/original-art/prints/2776/profile-of-a-lady
Thank you so much for any advice you can offer.
Best,
Linda
-
Hey George. Thanks for cluing me into the Holiday Express reference. Very funny. And yes, you were able to help me out.
Thank you!
-
No problem, glad I could help.
The Holiday Inn Express reference is in regards to a series of commercials they ran some time ago lol...
Here's a Youtube video from one of them:
http://www.youtube.com/watch?feature=endscreen&NR=1&v=l8Ah8WTL2i8
It basically means that I don't normally code in Ruby, but I think I can still help you out ;).
-
Hi George,
Thank you for your response. No, not too technical at all. I follow what you're saying. I'll pass this information on to my client and hopefully it's a relatively easy fix.
If anyone else has any additional information about implementing the solution specifically for Ruby code, I would appreciate it.
Thank you!
Linda
P.S. George, I'm curious, what is the connection between being a Ruby developer and staying at a Holiday Inn Express?
-
It looks like the product pages are dynamically created based on the product id in the URL (e.g. 2776 from your product page example). This product page could be updated to dynamically produce a different title based on this same information.
For example:
$product = getProductByProductID(2776);
$artist = getArtistByArtistID($product->artistID);
<title><?php echo "$product->name by $artist->name"; ?></title>
?>
Mind you, this is PHP code and you are using RESTful URLs so your site is likely written in Ruby - though I'm just guessing here.
For Ruby, this is essentially pseudo-code as I am not a Ruby developer by day (though I did stay in a Holiday Inn Express last night), but I believe you are looking to do something like this in your controller:
def product_page
@product = Product.find(params[:id])
@artist = Artist.find(@product.artistid)
@page_title = "<%=@product.name%> by <%=@artist.name%>"
end
Then in your page template you can use:
<title><%= @page_title %></title>
Hope this helps and sorry if it is too technical/cryptic; but your developers should be able to do something like this pretty easily. It appears to already be underway to produce the rest of the page content. Now they just need to use it to populate the page title (and maybe the meta description - use part of the product description).
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
-
Title and Description for blog pages
Hello, Could you please help me figure out how to create title and description for my website blog's pages? And for projects' pagination (third example below): https://www.titanpavers.com/blog/page/3/
Technical SEO | | VELV
https://www.titanpavers.com/blog/page/4/
https://www.titanpavers.com/projects/page/2/ Thank you!0 -
How can I avoid duplicate brand name in the title serp?
Hello, How can I avoid duplicate brand name in the title serp? For example:
Technical SEO | | jh0sz
In this page: https://www.latam.com/es_cl/ The title setted is: <title>LATAM Airlines en Chile | Sitio Oficial</title>
But in the SERP show: LATAM Airlines en Chile | Sitio Oficial - LATAM.com Can I avoid LATAM.COM at the end of the title? Regards 8J3jEAX1 -
How Google sees my page
When looking for crawlability issues, what is the difference between using webmaster tools Fetch as google, looking at the cached pages in google index site:mypage.com, or using spider simulator tools.
Technical SEO | | shashivzw0 -
Google showing https:// page in search results but directing to http:// page
We're a bit confused as to why Google shows a secure page https:// URL in the results for some of our pages. This includes our homepage. But when you click through it isn't taking you to the https:// page, just the normal unsecured page. This isn't happening for all of our results, most of our deeper content results are not showing as https://. I thought this might have something to do with Google conducting searches behind secure pages now, but this problem doesn't seem to affect other sites and our competitors. Any ideas as to why this is happening and how we get around it?
Technical SEO | | amiraicaew0 -
Changing all titles
A new client of mine has a terrible Wordpress site with many issues and one of these is keyword stuffing, especially in the title. We all know how bad it is, but then what's the best way to remove the keywords in excess? They stuffed 4 keywords (average 3 terms per keyword) in the wordpress General Settings "Site Title", so all of them are included in the title, and there are 200 pages basically with the same, stuffed, title. I am pretty sure if I remove them, and put a unique keyword per page I would have a huge rank drop, but is there any way to minimize it? 2nd question: should I improove the on-page factors and wait for the rank drop/resume before starting a linkbuilding campaign? Thank you. DoMiSol
Technical SEO | | DoMiSoL0 -
SEOMoz is finding jpegs on my site and reporting them as pages with missing meta titles
SEOMoz has just done a crawl of my site, and found 600 pages with missing meta title errors. When I have checked the list of these pages, they are all jpegs and not pages. Why is SEOMoz reporting that this .jpg files have missing meta titles on my site, which is www.webmakercms.com? SEOMoz has run several crawls of my site and this is the first time it has brought up this list of jpegs as errors and I don't understand why?
Technical SEO | | mfrgolfgti1 -
Too many on page links
Hello I have about 800 warnings with this. Example of one url with this problem is: http://www.theprinterdepo.com/clearance?dir=asc&order=price I was checking and I think all links are important. But I suppose that if I put a nofollow on the links on the left which are only for navigation purposes I can get rid of these warnings. Any other idea?
Technical SEO | | levalencia10 -
High number of Duplicate Page titles and Content related to index.php
It appears that every page on our site (www.bridgewinners.com) also creates a version of itself with a suffix. This results in Seomoz indicating that there are thousands of duplicate titles and content. 1. Does this matter? If so, how much? 2. How do I eliminate this (we are using joomla)? Thanks.
Technical SEO | | jfeld2220