How to migrate from the old domain to the new domain?

How to migrate from the old domain to the new domain? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the How to migrate from the old domain to the new domain? error on your web browser. Problem :


I just got finished with moving my site from one domain name to another. All old links on social media and search engines are broken. If I click on a link from reddit or Facebook it still points to olddomain.com. Even though if I type olddomain.com into a browser, newdomain.com does pop up. Is there anyway I can resolve this issue? All I did was export the old site data, switched to the new site, and imported the new site back. What am I missing now?



Google is coming with weird results when I search for this topic. I am using godaddy and wordpress with over 500 posts if it matters and I set up 301 redirect on the main olddomain.com to the newdomain.com so that works.



As requested by the community my .htaccess file is below:



#I have 500 of these for each link: 
redirect 301 people-of-earth-unrenewed-at-tbs/ http://channelactivist.com/people-of-earth-unrenewed-at-tbs/

#Then I have this at the end:
# Redirect the site
RewriteEngine On
# Take care of www.johnjfalco.com
RewriteCond %HTTP_HOST ^www.johnjfalco.com$ [NC]
RewriteRule ^(.*)$ http://channelactivist.com/$1 [L,R=301]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Solution :

All the existing links won't automatically change to the new domain. They never will, except on some websites that take the time or have that automated.



But as long as you keep olddomain.com with the 301 redirect, clicking on those old links should bring the people to the new site just fine.



However, it is not unlikely that Facebook and Twitter will lose the image/preview, whatever you'd want to call that one. In Facebook, it's possible to edit the post and replace the default image from the website with an image that you directly upload on Facebook. It takes more time to do that, but from what I understand, those pictures will stick around.



As Pasakgroup mentioned, telling Google through the Google Console will help with SEO on Google by transferring the old juice to the new domain as you make it official there.






Update from links:



I tested with wget which allows me to see the reply header:



$ wget -S http://johnjfalco.com/people-of-earth-unrenewed-at-tbs/
--2018-06-28 18:39:15-- http://johnjfalco.com/people-of-earth-unrenewed-at-tbs/
Resolving johnjfalco.com (johnjfalco.com)... 184.168.131.241
Connecting to johnjfalco.com (johnjfalco.com)|184.168.131.241|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 404 Not Found
Server: nginx/1.12.2
Date: Fri, 29 Jun 2018 01:39:15 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
2018-06-28 18:39:15 ERROR 404: Not Found.


As we can see, we get a 404, not a 301. So I'm not too sure how you think you implemented the 301, but it doesn't see to work right for all pages.



I also tested the home page and that one has a 301 as expected:



$ wget -S http://johnjfalco.com/
--2018-06-28 18:41:17-- http://johnjfalco.com/
Resolving johnjfalco.com (johnjfalco.com)... 184.168.131.241
Connecting to johnjfalco.com (johnjfalco.com)|184.168.131.241|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 301 Moved Permanently
Server: nginx/1.12.2
Date: Fri, 29 Jun 2018 01:41:17 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Location: http://channelactivist.com
Location: http://channelactivist.com [following]
--2018-06-28 18:41:17-- http://channelactivist.com/


As we can see here, we get an HTTP/1.1 code of 301 and a Location: with the new domain name. So the home page is working, but not the other pages.



So now the next question is: how did you implement the redirects? If you asked GoDaddy to do it, it's not going to work right. You should keep the website on your account and add an .htaccess file with the code as shown in the other answer.



RewriteEngine on
RewriteRule ^/(.*)$ http://channelactivist.com/$1 [R=301,L]


What this does is take any path from the existing request (^/(.*)$) and stick it at the end of the new URL (the $1). That way a URL such as:



http://old.example.com/some/path/and/filename.html


can become:



http://new.example.com/some/path/and/filename.html


However, showing us your existing .htaccess code may help us more resolving your redirect problem. (please put in your question)






Update about the .htaccess file.



Here you have a condition, which makes sense, only you very specifically test for www...



RewriteCond %HTTP_HOST ^www.johnjfalco.com$ [NC]


I would not test the www part and you probably don't really need the ^ and $ because you probably won't get hits with names that don't match a domain you own (not much and very unlikely would it match your old domain.)



I would change that condition to this:



RewriteCond %HTTP_HOST johnjfalco.com [NC]


This being said, if GoDaddy is in the middle (which would explain why we get a GoDaddy 404 page) then just changing the .htaccess file won't be sufficient.






I tested the latest and see a 302 instead of a 301.



Not only that, the redirect does not include a domain name. That's not correct. You must include a protocol and domain name in the Location: ... field.



Just in case, I tested with my browser which has Firebug and clicked the Network tab. This shows you the Location header field.



enter image description here



So... the .htaccess you shown us is not what is generating the redirect at the moment. It could still be GoDaddy being in control. You should cut them out completely. Your old domain is good until September, so that's not the problem.



First of all, you should change domain name in Google Search Console, from property setting, by Change of Address.

After that, you should redirect your old domain to your new domain by



Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]
</IfModule>

We hope that this article has helped you resolve the seo, redirects, wordpress error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=