Your website source code is hidden under all the images, texts and calls to action on your website.
Google and other search engines "read" this code to determine where to display your web pages in their indexes for a particular search query.
This is a quick guide that will show you how to read your own website source code to make sure it is SEO friendly. I'll also go over some other situations where knowing how to view and examine the correct parts of the source code can be helpful in other marketing efforts.
How to view the source code
The first step in verifying your website's source code is to see the actual code. You can do this easily with any web browser. Below are the keyboard shortcuts for viewing your website's source code for PC and Mac.
- Firefox: Ctrl + U (i.e. press and hold the Ctrl key on your keyboard. Hold down the Ctrl key and press the “u” key.) Alternatively, you can go to the “Firefox” menu and then click on "click". Web Developer ”and then“ Page Source ”.
- Internet Explorer:: CTRL + U. Or right-click and choose View Source.
- Chrome: Ctrl + U. Or you can click the weird looking button with three horizontal lines in the top right corner. Then click on "Tools" and select "View Source".
- Opera: Ctrl + U. You can also right-click the webpage and select "View Page Source".
- Safari: The keyboard shortcut is Option + Command + U. You can also right-click on the webpage and select "View Page Source".
- Fire fox: You can right click and select Page Source, or navigate to your Tools menu, select Web Developer and click Page Source. The keyboard shortcut is Command + U.
- Chrome: Navigate to View, click Developer, then click View Source. You can also right-click and select Show Page Source. The keyboard shortcut is Option + Command + U.
Once you know how to view the source code, you need to know how to look for things in it. Usually, the same search functions that you use for normal web surfing apply to the search in your source code. You can use commands like CTRL + F (for search) to quickly search your source code for important SEO elements.
Source code title tags
The title tag is the holy grail of on-page SEO. This is the most important thing in your source code. If there is anything you would like to remove from this article, please keep the following in mind:
You know the results that google gives you when you search for something?
All of these results come from the title tags of the web pages they link to. If your source code doesn't include title tags, they won't be able to appear in Google (or any other search engine). Believe it or not, I've actually seen websites with no title tags!
Now do a quick Google search for the term "Marketing Guides":
You can see that the first result applies to the KISSmetrics blog section in marketing guides. If we click on the first result and view the page source code, we see the title tag:
The title day is marked by the opening day:
You can see that the content in the title tag is the same as that used in the heading of the first Google result.
Not only are title tags required to be included in Google search results, but Google also identifies the key keywords in your title that they think are relevant to what users are looking for.
If you want a particular webpage to be rated for a specific topic, make sure that words describing the topic are included in the title tag. In this post, you will learn more about how important keywords and title tags are to your overall site architecture.
There's one last thing to remember: every webpage on your website should have a unique title tag. Never duplicate this content.
If you have a small website, say 10 or 20 pages, it is easy enough to check each title tag for uniqueness. However, if you have a larger website you need some help. This is a simple four step process:
Step 1: Open Ubersuggest, enter your URL and click Search
Step 2: Click on "Site Audit" in the left sidebar
Step 3: Review Top SEO Issues
Upon landing in the Site Audit Summary, scroll down to the fourth section of Results (it's the last one on the page) to review top SEO issues.
This is where you can find out if you have duplicate title tags or meta descriptions. If you don't see anything here, you know. If you see duplicates such as For example, the 30 pages for my website, go deeper.
Step 4: Click on "Pages with duplicate"
You may find a big problem such as: For example, several of your blog posts that use the same title tag. You may also find that this is not a big deal, like the 26 pages in my report, entitled "Blog Neil Patel's Digital Marketing Blog."
If you click on the 26 page prompt you will see:
While the title is the same on 26 pages, it's only the pages of my blog that the content is on. These are not the actual blog posts or primary pages of my website.
Meta descriptions in the source code
Another important part of the header of your website is the meta description tag. This 160 character snippet is a free commercial copy that will appear under your title content in search engines.
I've seen hundreds of websites completely ignoring this tag. It's very easy to find in your source code:
Make sure it shows up on all of your web pages. Most importantly, make sure you don't duplicate it on multiple pages. Duplicating a meta description tag is not a search engine penalty, but it is a very big marketing mistake.
Lots of people gloss over the meta description, but you should really be concerned about it as it will be read by search engine users. Think about which copy would help attract more visitors and increase click-through rates.
H1 headings in the source code
H1 headings have a bit of on-page SEO weight. So it's a good idea to double-check your pages to make sure you're using them properly. For each page on your website, check the source code to see if you recognize this tag:
You don't want more than one set of H1 tags to appear on a particular webpage. In other words, don't try to purposely improve your SEO by involving multiple H1s. Over-optimizing your website will hurt you in the long run.
Use your H1s for what they are meant to do: the largest heading on the page. On your homepage, this could be your value proposition.
Nofollows in the source code
If you are into link building, it is a must to check your backlinks to see if they are not being followed.
But before I go any further, I need to talk a little bit about what "Link Juice" is.
In the world of search engine optimization, having another website linked to your website is a great achievement. This link is seen as confirmation by search engines. Search engines take into account the number of links pointing to your website when they rate your website in their search engines. "Link Juice" is a non-scientific term for the so-called performance that the link on your website or webpage provides.
Nofollows are an attribute that can be coded into a link to prevent the link juice from flowing to a website. This is a very common thing that you will see in the links in the comments section of blogs.
To find out if your backlinks are passing link juice, you should check that the links do not contain any of the following attributes. If so, the link you worked so hard on won't help you much as the nofollow attribute is basically telling Google to ignore your webpage.
In the picture above there is rel = "external nofollow" in the anchor link. Although a person can click the link, no link juice will be shared.
Some people think that Google is actually counting some link juice from nofollows, but to be conservative on backlink counting, assume nothing is passed.
Google will tell you to ignore this practice, and I agree somewhat with that. It's a tedious, unnecessary task, and your energy is better spent creating great content instead.
Image alt tags in the source code
Blank image alt tags are very common SEO boo boos. Image alt tags describe what your images are to robot search engines.
If you run an ecommerce website, you definitely want to make sure your alt tags are filled in. It is a good idea to make sure that the brand name and serial number of the product are included in the alt-tag description.
Above is a screenshot of an image tag with the alt tag buried in it.
You shouldn't use alt tags on decorative images. This can be viewed as over-optimizing and could earn you a penalty. Just make sure you have your alt tags filled in for:
- Pictures of goods
- Your website logo
- Photos of team members
Make sure your analytics are properly installed
One final important reason for checking your source code is to make sure that you have Google Analytics installed on every webpage on your website.
The verification is very simple. For Google Analytics, just view the source code of your web pages and search for the letters "UA".
If you find an instance in which the "UA" is followed by a 7-digit number, you have confirmed that Google Analytics is installed on that one page.
Also, keep track of the number of times "UA" appears on your website. Sometimes your Analytics tracking code is accidentally inserted multiple times, which is not required. In this case, your developer should remove the additional instances.
Next, you need to check the remaining web pages on your site to see if your analytics code has been included on every page. If you don't have your Analytics tracking code on every page of your website, you won't get a complete picture of what's going on on your website, which makes Analytics unusable.
This can be a daunting task when you have a huge website. It may even be impossible to check manually.
I like to use xml-sitemaps.com to get a text file of all the urls that my website has. This allows me to create an inventory checklist that I can use to keep track of which URLs might need additional attention (e.g. installing analytics).
It's also a great tool for highlighting duplicate content issues and other weird things that may be lurking on a web server.
Even on xml-sitemaps.com you only get 500 free results. You may need to ask your developer to give you a URL inventory so that you can get a full map of your extensive website.
Also, you may want them to create a script or program to do these checks for you so that you don't have to do them manually.
Knowing how to read basic source code is important for anyone building a website. It will help you build SEO friendly web pages and websites and identify pre-existing SEO issues that are affecting your website's position in the SERPs.
If you have problems fixing SEO issues or need help with SEO in general, our agency can help you.
See How my agency can drive Firmly Traffic volumes on your website
- SEO – Unlock massive amounts of SEO traffic. See real results.
- Content Marketing – Our team creates epic content that is shared, links accessed and visitors drawn.
- Paid media – effective paid strategies with a clear ROI.
Book a call