Cannot find index for non www

Cannot find index for non www - 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 Cannot find index for non www error on your web browser. Problem :


The domain points to an A-Record name server, and as of now the name servers are defaulted to registrar (GoDaddy). I went into /var/www directory and edited index.html to <meta http-equiv="refresh" content="0; url=http://siteB.com/" />, and now only www.example.com redirects to site B. non-www still points to site A. How can I have both non-www and www point to site B? Or better yet, how do I know where index.html for non-www is?
I'm no Apache wiz, but I have webmin with Apache Webserver.


Solution :

I wouldn't recommend using HTML meta tags to manage redirects. Go into your root directory, find the .htaccess file and add this to the top.



# This allows you to redirect your entire website to any other domain

Redirect 301 / http://siteB.com/


You may have to edit your settings to view that file because most programs hide the .htaccess file by default. This will redirect all pages to that site. If you have pages that exist in A but not B, you are going to get 404 errors on those redirects.


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