Fixing Wordpress Title and Description Tag Placement
-
I know how important the title and description tag are and I know it is important to have them place at the top of the code. However, when I view the source on a Wordpress template, I see it looks messy. Here is an example of what the source looks like. Is there a plugin or an adjustment to be made so the code is cleaner? To get rid of spaces and blank lines in code. Or should I just not worry about the way the code looks?
Notice the first example has a break after the <title>, then after the title there is this</p> <p style="color: #5e5e5e;"><strong><em><meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </em></strong></p> <p style="color: #5e5e5e;"><strong><em> </em></strong>then the description? Can that be moved?</p> <p style="color: #5e5e5e;"> </p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span><head profile="http://gmpg.org/xfn/11"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span><title></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span>tite text goes here <span> </span></title> " />
Here there are no breaks after <title>and the <title> is directly above the description</p> <p style="color: #5e5e5e;"> </p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"> </span><span style="color: #5e5e5e;"><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><head profile="http://gmpg.org/xfn/11"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><meta http-equiv="content-type" content="text/html; charset=UTF-8" /></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><title>tite text goes here</title>
-
RDK is right on. I would add some sites go a step further and compress their html code. This step improves the page loading speed a tiny bit as it saves the browser from having to do this work. Reading the html code becomes much more difficult when all the spaces are removed.
-
Viewing the source will look different, depending on how you're getting the source into an editor. On many CRM (wordpress, joomla, etc) the source code can display differently than it is stored on the back-end.
Luckily, spaces don't matter. They are essentially deleted when a browser renders them.
The title and description tags must be in the section and it doesn't matter where they are within the head section . Just make sure they don't come after the tag.
Don't worry, be happy.
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
-
Rich Snippets in wordpress websites
Hi all, What is the best and easiest plugin to configure and implement on WordPress blog websites? And what is the specific markup recommended for blog/article sites? Thanks!
On-Page Optimization | | emojo0 -
Changing site title
I'm wondering what the procedure and implications are of changing my sites tile? I realise that my Having my keyword in my sites title whilst chasing the same keyword in articles may be causing over optimization. The slug also takes on the article title too, in effect giving me the keyword three times before I've even written my article. Example below. Imaginary site title : soap benefits.org Article: The essential guide to making homemade soap Slug: The-essential-guide-to-making-homemade-soap As you can see, soap has now been mentioned three times, not including excerpt/meta description or image alt tags. As most of the article titles would contain my supposed keyword "soap" I'm thinking the best option would be to change site title with allinoneseo (that possible?) and change the slug to something relevant, giving me more room to escape over optimization. Does this sound sensible? I don't have that many articles so if I had to change other things it wouldn't be too much of a hassle. It seems a pity to loose my sites title I picked, but if I end up writing hundreds of articles this would be a problem. Help appreciated.
On-Page Optimization | | marangus0 -
Fewer keywords in title tag?
Hello, I have a title tag that includes three keywords and has a total of 59 characters. The third keyword is not very important. If I eliminated the third keyword, leaving the first two (for a total of 48 characters), would the ranking value of the first two keywords increase? Does including the third keyword dilute the value of the first two? Thank you!
On-Page Optimization | | nyc-seo0 -
Meta Description Question
Is it ok to put your domain name in the meta description if that is the name of your company? so if my company name is BlaBla.com and I want to have a meta description like Shop for your next Widget at BlaBla.com. We have Widget in 30 colors. Free shipping for orders over $50. and I am obviosuly promoting the widget page is this ok. I am concerned that Google will not like the domain name in the meta description. After Peguin I am paranoid about my shadow.....LOL
On-Page Optimization | | freestone0 -
Title Tag Over Optimization
Hey, I've read that adding the company name to the title tag was a waste of space since the more words the less weight each one has, with all this over optimization preventive measures, should I rewrite the title tags format with company names? and if so should it be (company name): (naturally organized keywords) (naturally organized keyword) | (Company name). or can I keep it just naturally organized keywords Also I used to do (keyphrase) - (keyphrase) instead of commas, should I fix this? I asked this question on Randy's post http://www.seomoz.org/blog/6-changes-every-seo-should-make-before-the-over-optimization-penalty-hits-whiteboard-friday but didn't really get an answer. Thanks!
On-Page Optimization | | nrv0 -
Confused about meta tags.
(Ok, this might be a stupid question.) I am a little confused about the best practice for the Meta Tag. I know they don't have a real effect on ranking. But I am getting "mixed signals" as to their general use. I've pasted the 2 examples of below that are confusing me. From my Campaign's Crawl Diagnostics: (I have missing Meta Tags) "Meta description tags, while not important to search engine rankings, are extremely important in gaining user click-through from search engine result pages (SERPs). These short paragraphs are the webmaster's opportunity to advertise content to searchers and let them know exactly what the given page has with regard to what they're looking for" From The Keyword Optimization Tool: (Avoid Using Meta Keyword Tool) "Search engines have, for years, ignored the meta keywords tag as a ranking signal. Although it technically does not harm rankings, it can be used by competitors as a method to extract your targeted terms and thus, we recommend against its use. " I would love to hear opinions on this topic. I am trying to decide wether or not to use unique meta tags on every blog post.
On-Page Optimization | | NerdsOnCall0 -
The Better Title to Use?
Hello Mozers- I am targeting the keywords "liposuction scottsdale", "liposuction phoenix", "liposuction mesa", "liposuction arizona". Out of the following two Titles below, one would you consider the better one? And Why? I am leaning towards the second example. If you have any more ideas that would be great. 1). Tummy Tuck Scottsdale, Phoenix, Mesa, Arizona 2).Tummy Tuck Scottsdale | Tummy Tuck Phoenix, Mesa, Arizona. Thanks!!
On-Page Optimization | | Red_Spot_Interactive0 -
Optimizing Wordpress Categories
I’m trying to optimize the category links in the wordpress blog http://blog.reputationforward.com. I’m in the process of installing the Yeost SEO plugin and am going to revise the Category Title Tags, Meta Descriptions and slugs. I’m also in the process of using Tags so that I can get the posts that appear in a category to be specific to that category (currently the publisher is listing posts in multiple categories: See “Business Management Category”). But other than that, is there anything else I can do to optimize each category?
On-Page Optimization | | EricVallee341