Gosi
Gosi

Reputation: 2003

Previous htaccess file making google display my old URL

Recently I changed the layout and contents of my website. Since the htaccess file is not visible in the upload section in the web server, I totally forgot about it.

In the old website, I had an htaccess file to remove the trailing slash and extensions, so instead of showing example.com/test.php , it will show example.com/test/

But for my new layout, I'm not bothering with removing the extension and to add a trailing slash behind the url.

I forgot about the htaccess when uploading the new site and made google recrawl my website using my google webmasters account and now its also showing some of the old url with trailing slashes as well in the google search.

Steps I took to fix this problem

Basically I created an empty htaccess file and uploaded it to overwrite the previous one (which contained the removal of url extension and adding a trailing slash to url).

Now when I search my website in google, it still displays some of my old website url with the trailing slash, but when clicked it shows 404 error. (which is good, because it shows that the empty htaccess has overwritten the previous one, but the old url with trailing slash should not be showing in the search results).

Keep in mind, I used my google webmaster to recrawl my new layout website with the old htaccess file (which I totally forgot about and should have removed it first). Its only after the website was crawled, I uploaded the empty htaccess file.

So my question is, do I have to do anything on my part such as using my google webmaster to remove url with trailing slash and url without extensions? Or will google re-crawl my website?

Do I have to delete everything again from my webserver, delete my website from my google webmaster account and re-upload everything? Or will google recrawl my website and remove all the 404 error pages from the search results? If so, roughly how long would it take google to remove those 404 error pages?

Upvotes: 1

Views: 190

Answers (1)

Łukasz Rysiak
Łukasz Rysiak

Reputation: 3078

rule of thumb is to check if old url's are important to your sales or traffic, so if you have links and/or traffic to the old urls, you should add redirects to keep SERP positions/traffic.

if you don't have traffic/links you can simply remove these urls via GWT, or wait a while for google to reindex your site. Also adding a sitemap would be a good idea, since new pages should replace old ones in SERP's pretty fast (same domain, same or similar content, old one returns 404 == removed from index).

Its pretty common to get such 404 even after a long time after migration.

Upvotes: 1

Related Questions