Change domain name WordPress, the SEO friendly way

Change domain name WordPress, the SEO friendly way

How to change domain name of your WordPress site the SEO friendly way, without losing PR and link juice

I recently changed domain for this blog from egeek.dk to egeek.io. There are two parts of changing your domain or moving your site to a new host and domain – the technical part, and the SEO part where you try to preserve your search engine rankings. Doing it the right way will save you a lot less trouble in the future, and make you keep most of your hard earned SEO work. On the other hand, doing it wrong can have fatal consequences on your rankings in the search engines.

I’ll narrow it down and describe how I did it, and how you should do it too.

In my case I wanted to change domain from egeek.dk to egeek.io on a running WordPress site. I was not switching host/server, but just wanted to “rebrand” my site with a new domain. Whether you are in the same situation and want to rebrand your site, or want to switch host and domain, you can use these steps as a guideline.

I’m currently running this blog on IIS in a Windows Server environment, but the fundamentals are the same, and the following steps can be incorporated, should you run your site/blog on Apache, Nginx or on a LiteSpeed server in a *nix environment.

Disclaimer

Before starting out, I want to stress that changing your domain from olddomain.com to newdomain.com will affect your search engine rankings in the beginning. After you do a switch Google will index both of your sites, where after olddomain.com will slowly dissapear from the search results. I’ve had pages indexed with meta titles and descriptions chosen by Google, instead of the meta-data I chose for the pages (yeah, Google can do that). After the switch these pages are currently indexed with my new domain, and yet again Google has chosen meta titles and descriptions, though different (and much worse) than before. I had top 1 placements in Google with feature images and snippets, which are now gone after I changed domain. It’s a part of the process, but I’m positive the rankings and feature snippets will come back up, when everything is rolled out completely. It’s inevitable for things like these not to happen, as Google needs to reindex your whole site again. Don’t put too much concern into this though, as things will smooth out, and if you play it right, you’ll be back up where you were before. That’s what this guide is about.

Table of content

1. Domain name
2. Site and bindings
3. Change WordPress address
4. 301 redirects
5. Rename SQL database
6. Add properties in Google Search Console
7. Change address in Google Search Console
8. Submit sitemaps in Google Search Console
9. Update Google Analytics account and tracking code
10. Fetch site and submit to index
11. The afterwork

Read More

W3C Validator: #call_to_action h4{padding:0px 5px;}

I was checking this site with W3C Validator, and got the error:

[html]
<strong>Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)</strong>

<style type="text/css">#call_to_action h4{padding:0px 5px;}</style>

<div><dl><dt>Contexts in which element <a href="http://dev.w3.org/html5/spec-author-view/#the-style-element">style</a> may be used:</dt><dd>If the <a href="http://dev.w3.org/html5/spec-author-view/#attr-style-scoped">scoped</a> attribute is absent: where <a href="http://dev.w3.org/html5/spec-author-view/#metadata-content">metadata content</a> is expected.</dd><dd>If the <a href="http://dev.w3.org/html5/spec-author-view/#attr-style-scoped">scoped</a> attribute is absent: in a <a href="http://dev.w3.org/html5/spec-author-view/#the-noscript-element">noscript</a> element that is a child of a <a href="http://dev.w3.org/html5/spec-author-view/#the-head-element">head</a> element.</dd><dd>If the <a href="http://dev.w3.org/html5/spec-author-view/#attr-style-scoped">scoped</a> attribute is present: where <a href="http://dev.w3.org/html5/spec-author-view/#flow-content">flow content</a> is expected, but before any other <a href="http://dev.w3.org/html5/spec-author-view/#flow-content">flow content</a> other than <a href="http://dev.w3.org/html5/spec-author-view/#inter-element-whitespace">inter-element whitespace</a>, and not as the child of an element whose content model is <a href="http://dev.w3.org/html5/spec-author-view/#transparent">transparent</a>.</dd><dt>Content model for element <a href="http://dev.w3.org/html5/spec-author-view/#the-div-element">div</a>:</dt><dd><a href="http://dev.w3.org/html5/spec-author-view/#flow-content">Flow content</a>.</dd></dl></div>
[/html]

After some digging around, I found out it was the plugin Social Essentials which was causing these errors. A WordPress pluging for sharing your posts to social networks.

For now I’ll be using Simple Social Sharing, till I might find a better alternative.