After redirecting to `www` is it problematic if my sitemap XML has non-www URLs?

After redirecting to `www` is it problematic if my sitemap XML has non-www URLs? - 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 After redirecting to `www` is it problematic if my sitemap XML has non-www URLs? error on your web browser. Problem :


I'm confused about canonical issue. I've setup in .htaccess to redirect the URLs without www to www.



Now the URLs in this link in http://www.example.com/sitemap are all without www. Is this going to affect anything?



Will http://www.example.com and http://indiacustomercare.com be considered same or different?


Solution :

If you'd properly set redirect 301 from .htaccess, robots will know your preferred URL starts with www and they will index it using www because redirect 301 indicates no-www is removed permanently.
Additionaly You can tell Googlebot www is your preferred URL, login into Google Webmaster Tools go to Site configuration -> settings and select Display URLs as www.example.com



If you are going to use absolute URLs in your internal links it will be better to be consistent with your preferred domain. If you don't want to bother about inserting http://www.example.com/ in your links' href then don't include protocol and domain there, just set your links as href="/folder/page.ext". In this way the links will be appended to your domain and bots will see them as http://www.example.com/folder/page.ext


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