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
-
Truncated product names
Due to the restraints of category page layout many of the products in certain categories have the product titles truncated, in some cases missing off 2-5 words depending on the product in question. The product name which displays on the category page is lifted straight from the product page itself, so not possible to do something like "product name including spec..." to place ... to indicate a bit more. I'm assuming not but just wanted to check that Google will not frown on this. Text is not being hidden it just does not render fully in the restricted space. So there is a scenario of 'bits of' text in the source not displaying on the rendered page.
Technical SEO | | MickEdwards0 -
Is it good to redirect million of pages on a single page?
My site has 10 lakh approx. genuine urls. But due to some unidentified bugs site has created irrelevant urls 10 million approx. Since we don’t know the origin of these non-relevant links, we want to redirect or remove all these urls. Please suggest is it good to redirect such a high number urls to home page or to throw 404 for these pages. Or any other suggestions to solve this issue.
Technical SEO | | vivekrathore0 -
Crawl Diagnostics and Duplicate Page Title
SOMOZ crawl our web site and say we have no duplicate page title but Google Webmaster Tool says we have 641 duplicate page titles, Which one is right?
Technical SEO | | iskq0 -
My website pages are not crawled, what to do?
Hi all. I have made some changes on the website so i like to crawled them by the search engines Google especially. I have made these changes around 2 weeks ago. I have submitted my website on good bookmarking websites. Also i used a tool available in Google webmasters "Fetch as Google", Resubmitted a sitemap.xml. Still my pages are not crawled your opinion please. Thanks
Technical SEO | | lucidsoftech0 -
Determining When to Break a Page Into Multiple Pages?
Suppose you have a page on your site that is a couple thousand words long. How would you determine when to split the page into two and are there any SEO advantages to doing this like being more focused on a specific topic. I noticed the Beginner's Guide to SEO is split into several pages, although it would concentrate the link juice if it was all on one page. Suppose you have a lot of comments. Is it better to move comments to a second page at a certain point? Sometimes the comments are not super focused on the topic of the page compared to the main text.
Technical SEO | | ProjectLabs1 -
Would you advise or not to include a sites name at the end of each title tage? Example "Top 3 things to do in New York | yoursite.com"
Having a discussion on if we should include our domain at the end of each site page. Re read over the following pages and question remove the brand to keep under 70 characters? or Shorten the page Title before the brand? Let the title exceed 70 characters? What is your thoughts?
Technical SEO | | Harley2g0 -
Limit for words on a page?
Some SEOs might say that there is no such thing as too much good content. Do you try to limit the words on a page to under a certain number for any reason?
Technical SEO | | Charlessipe0 -
Is it better to delete web pages that I don't want anymore or should I 301 redirect all of the pages I delete to the homepage or another live page?
Is it better for SEO to delete web pages that I don't want anymore or should I 301 redirect all of the pages I delete to the homepage or another live page?
Technical SEO | | CustomOnlineMarketing0