Mobile app version of vmapp.org
Login or Join
Courtney195

: How to update my website's URL in Google from www to non-www I am having trouble updating the URL of my first uploaded website that I made from scratch. I have changed the the URL and have

@Courtney195

Posted in: #GoogleSearch #GoogleSearchConsole #Url

I am having trouble updating the URL of my first uploaded website that I made from scratch. I have changed the the URL and have submitted to Google, but when I type in the name 'example' into Google my old website URL (www.example.com/example/) is displayed with the old title and meta tags. However when I type in example.com, which is the new URL, it shows first and it's the correct website with the correct tags and title.

How can I make the old URL www.example.com/example to just example.com? I have taken out the from the new URL, would that be a problem?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney195

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sims2060225

If you're using an apache server, you can add this to your .htaccess file:

# Enable Rewrite engine
RewriteEngine On
# Check if we're on the www subdomain
RewriteCond %{HTTP_HOST} ^www.([^.]+.[^.]+)$
# If the previous condition is true, redirect to non-www
RewriteRule ^(.*)$ %1/ [R=301,L]


The above code will redirect everything to a non-www version of your URL

More info >>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme