Changing subdomain url to new root url issue (404)

Changing subdomain url to new root url issue (404) - 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 Changing subdomain url to new root url issue (404) error on your web browser. Problem :


I have a blog on a subdomain technotes.tostaky.biz and I want to move it to a new URL: www.mytechnotes.biz. Of course, I want to redirect technotes.tostaky.biz to www.mytechnotes.biz.



www.mytechnotes.biz has been set-up properly, but I am trying to figure what I should do for the redirect.



Right now, I have two A records (www.technotes and technotes) pointing to the IP address of the root tostaky.biz URL server.I also have a permanent redirect (both www and non-www) from technotes.tostaky.biz to http://www.mytechnotes.biz/.



When I open technotes.tostaky.biz in Chrome, I get a 404 "The requested URL / was not found on this server. That’s all we know."



I don't know what is causing this issue. Should I wait for propagation or do I need to modify my configuration? Should I use CNAMEs instead of A records?



P.S: I forgot to mention that www.technotes.tostaky.biz redirects properly.


Solution :

Apparently, my (blue) host was not modifying my .htaccess properly. I found the solution here.



I used the following:



RewriteEngine On

RewriteCond %HTTP_HOST%REQUEST_URI ^technotes.tostaky.biz/$ [NC,OR]
RewriteCond %HTTP_HOST%REQUEST_URI ^www.technotes.tostaky.biz/$ [NC]
RewriteRule ^(.*)$ http://www.mytechnotes.biz/$1 [r=301,nc]


instead of:



RewriteEngine on

RewriteCond %HTTP_HOST ^technotes.tostaky.biz$ [OR]
RewriteCond %HTTP_HOST ^www.technotes.tostaky.biz$
RewriteRule ^/?$ "http://www.mytechnotes.biz/" [R=301,L]

We hope that this article has helped you resolve the redirects, url, subdomain 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=