Does redirecting root folder to subdirectory affect SEO?

Does redirecting root folder to subdirectory affect SEO? - Google Search Console is a free application that allows you to identify, troubleshoot, and resolve any issues that Google may encounter as it crawls and attempts to index your website in search results. If you’re not the most technical person in the world, some of the errors you’re likely to encounter there may leave you scratching your head. We wanted to make it a bit easier, so we put together this handy set of tips about html, redirects, google-search, structured-data to guide you along the way. Read the discuss below, we share some tips to fix the issue about Does redirecting root folder to subdirectory affect SEO?.Problem :


I'm developing a very simple static website for my band (only four pages) and I'm currently struggling with structured data markup.



Right now my website hierarchy looks like this:




  • /


    • /home/

    • /music/

    • /photos/

    • /bio/




And in the file /index.html I'm using a javascript in the head to redirect to the home page:



<script>
document.location = "home"
</script>


No doubt that's working, but I'm not sure it's a good thing.



I'm worried this will affect in a bad way results on google search. Should I place my home page in the root directory or is it ok like this? It's better to exclude the root directory from the sitemap?


Solution :

For SEO it is better to do it on a server level and make sure to do a 301 redirect as this is much better for SEO.



Of course I don't know what response code a JS redirect will return.



Curl -I domain.com


The above will tell you what response code you're getting i.e 200, 301, 302


If the issue about html, redirects, google-search, structured-data is resolved, there’s a good chance that your content will get indexed and you’ll start to show up in Google search results. This means a greater chance to drive organic search traffic to your site.

Comments

Popular posts from this blog

Years after news site changed name, Google is appending the old name to search titles and news stories

Is it possible to outrank Google for a search term on their own search engine?

Load Wikipedia sourced biographies via Ajax or render it with the rest of the page as part of the initial request?