Reputation: 1369
I have a WordPress website which was installed in a particular folder (/site - url being in the format mydomain.com/site). This was installed like this since on the root level we had another site and we wanted to finalise some things on the /site installation before going live.
In due course, Google has indexed/crawled our site. Once we were ready to push our site live, we updated the index.php in the root to point to the /site installation so that anyone hitting mydomain.com will see the new site instead.
The issue is that now Google is showing a lot of search results for pages in the location mydomain.com/site/page and are returning a 404. The Google Webmaster Tools are also complaining about this and the fact that we have duplicate meta tags since the same page was indexed at mydomain.com/page and mydomain.com/site/page.
Is there a way to tell Google that my pages are no longer available at /site but rather on the root domain? What I found is just a temporary way for 90days in the webmaster tools, but i want this to be a permanent fix.
Thanks
Upvotes: 0
Views: 1229
Reputation: 11
Google has recently launched URL removal feature in Google search console. Now one can directly remove those unwanted URL's from URL removal. You can see URL removal option after login in Google search console in left panel. Alternatively, I have summarized the detail steps in my article that can be found at https://www.sdlcinfotech.com/search-engine-optimization/remove-url-from-google-search/
Upvotes: 1
Reputation: 14312
This is the most important part! It sounds obvious but it can often be overlooked.
The pages can be removed, but it is also possible to keep them at the location but have them set up to deny access e.g. in robots.txt, directory permissions, through the meta tags or 301 redirects.
Technically, this is the only step that's required, as once the pages are gone, Google will eventually remove the pages from the index. However this can take a long time, so the following steps will help.
Set up 301 redirects to redirect users to the corresponding page on the root domain.
This will have an immediate effect, so its a very useful step. It means that your users will get where they want, and it also tells Google to new location for the page
You can either in your .htaccess
if you know what you're doing, or use a redirection plugin if you don't.
Tip: If you are doing it yourself in .htaccess, I strongly recommend setting up and testing 302 (temporary) redirects first - once you know they are correct, change them to 301 (permanent) redirects. It can be very difficult to undo an incirrect 301 redirect!
"What I found is just a temporary way for 90 days in the webmaster tools"
That just means that if the pages still exist and are accessible, they'll be re-included after 90 days. But as long as you have removed them in step 1, they don't exist any more so they can't be re-included :)
You can submit pages for removal in Webmaster Tools "Google Index \ Remove URLS". Pages must be submitted individually, unfortunately.
Note: There is at least one Chrome extension that offer bulk removal, but I know noting at all about it so I'm reluctant to mention it here
This gives Google a list of all the pages on your site so they know what to index. If you are using a plugin such as Yoast, it will automatically generate and update the sitemap for you - all you have to do is submit it to Google!
(For any other users who may not already have their new site indexed). Go to "Crawl \ Fetch as Google" and fetch the full domain. then Submit for Index choosing "URL and its direct links".
Google will eventually find and index your site from your sitemap, but this should speed up the process.
You don't "make" Google do anything, its more of a suggestion really and they'll get around to doing it in their own time :) But hopefully these steps will help!
Upvotes: 1