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
-
Alt tags advice
Hello, When describe an alt tag from what I understand you need to put your keyword when you can and not literally describe the image. For example let's say I have a picture with 2 cyclists on a road in the dolomites. I would tend to describe it saying " 2 cyclists riding in the dolomites" But for google it is better to describe it saying "Bike riding in Italy and through the dolomites" based on the fact that I am looking to rank on "italy bike tours" Isn't it ? Thank you,
On-Page Optimization | | seoanalytics0 -
Noindex tags in WordPress
I'm receiving 4 duplicate content warnings from Roger.They are all "www.mysite/tag/tag-name". I'm using WordPress and have Yoast WordPress SEO installed. Should I set the tags to "noindex" in the plugin settings?
On-Page Optimization | | brandzz0 -
What are the benefits of the URL meta tag?
We have too many meta tags and want to get rid of all the outdated ones. However, we don't want to eliminate valuable meta tags by mistake. So, before we say goodbye to the URL meta tag, we want to make sure we understand the pros and cons, if any. By the way, we are not referring to canonical URL tags, just URL as in:
On-Page Optimization | | GRIP-SEO0 -
Does Title Tag have to be in the HEAD tag?
We are using templates that load the same header for every page. I'd like to just include a different title tag in the "body" template of each page. If I was to do this, does it affect SEO at all?
On-Page Optimization | | moziodavid0 -
Lead With Branded Keywords or Descriptive Keywords in Page Title for (Niche) Site?
Our site is hingeheads.com, and our products and product catalog are unique in two ways. For one our product is not something that people are generally aware of, and secondly our entire product catalog consists of different variations of the same product. **Catalog Overview: **http://hingeheads.com/collections/all Product Example: http://hingeheads.com/products/dolphin I keep wondering if it is better to lead the title with "branded keywords" [1] or with "descriptive keywords" [2]? Dolphin HingeHead | Unique Home Decor & Gift Idea | HingeHeads Dolphin Decor Accessories & Unique Gift Ideas | HingeHeads I am currently going with the second solution, but I am always wondering if that's the right/better solution. I am curious to hear feedback from people who have more experience with this than I do. How would you structure the title for our product pages? Thanks! Kai
On-Page Optimization | | hingeheads0 -
Duplicate Title question
Thanks Mozzers in advance for any insight into what I'm sure is a basic SEO question. I'm working with a resort in the great state of Maine. Their home page title reads Maine Resorts, Resorts in Maine, (company name). The site has about 400 URL's and over half of the URL's utilize the first keyword phrase of the home page title, "Maine Resorts." Predominately, I find them used on the Accommodations pages (pages that describe each room with a picture) which I would label as deeper pages and non-conversion type pages. The page titles themselves are not exact duplicates of the Home Page Title but might read something like "Maine Resorts, Company Name, Accommodation Listing." My concern is that the heavy use of "Maine Resorts" as the first phrase in over 200 plus pages might be competing against the home page and pulling the home page ranking down. Thanks for any help given!
On-Page Optimization | | hawkvt10 -
How to Define Best Structure of Title Tag and Meta Description?
I want to define best structure of Title Tag and Meta Description for my eCommerce website. There are too many categories over there and many be increase in near future. There are 7K+ products live on website so, it's quite hard to develop Title Tag and Meta Description for all product pages. That's why I have set automatic Title Tag and Meta Description creation with help of developers. I want to do similar stuff for my category pages. Can anyone suggest me structure of Title Tag and Meta Description which suppose to help me in well over Google's organic result. I have define structure as follow. Title Tag: Category Name: FREE Shipping & Discount Category Name | Vista Stores Meta Description: Category Name with FREE shipping, 100% price guarantee, Buy and save 20% to 40% on attractive, modern and discount Category Name. Meta Keywords: Category Name I also want to give real time example with specific URL. (http://www.vistastores.com/69_21/outdoor/patio-umbrellas.html) Category Name = Patio Umbrellas so with help of above structure Title Tag and Meta Description will be as follow. Title Tag: Patio Umbrellas: FREE Shipping & Discount Patio Umbrellas | Vista Stores Meta Description: Patio Umbrellas with FREE shipping, 100% price guarantee, Buy and save 20% to 40% on attractive, modern and discount Patio Umbrellas. Meta Keywords: Patio Umbrellas So, Does it matter for good performance? If any inputs in same direction so I am eager to read it.
On-Page Optimization | | CommercePundit0 -
Comments on Title Tag
New to this and I'm working on a title tag. I was wondering if any one had opinions/input on if this looks good/bad/ugly. I replaced the actual name of the client with "Ranch Name" Guest Ranch Dude Ranch Wyoming Jackson Hole Activities RANCH NAME Thanks!
On-Page Optimization | | dbaxa-2613380