Sometimes there comes a situation where your webpages get hacked or attacked by someone else. There are many people who are not able to deal with these situations. 

Here, in this article we are are going to discuss how to remove hacked URLs from the Google index.

Once the page is indexed, then you need to remove the page from the website and deindex it from the search console. 

 Finding Indexed URLs

You can find the pages by searching the website URL along with “site:”. 

Check if URL is indexed in google

After browsing you can see the webpage URLs on the result page.

Finding URL Patterns from Breadcrumbs 

If you are searching in this manner you may only get a few details about the URL because the result will be in breadcrumbs style. 

But, with the help of an extension called Remove Breadcrumbs, you will get more results and it will also analyze the results if there is any pattern found.

Remove Breadcrumbs

Removing URLs from Search Console

After the previous step, you can open the Google Search Console and click on Removals to file a new request.

url removals

Here, you are having two options like cache cleaner and temporary remover.

Firstly, you need to remove it from your website and do the next part at the temporary removable section.

Finding URLs from Top Results

Here, you are having only the option to delete each webpage one by one. With the help of some resources, we can try to make it simpler.

While searching for the results, it is better to opt for the top hundred results instead of the top ten results.    

When you are finding the URLs one by one, it will take a huge time and effort. So, it is better to create a bookmark of a hundred results with a suitable name.

Adding Javascript Code to Export URLs

With the help of a special javascript code, you can get the entire URLs of the results to a single sheet.

You can add this by doing a right-click on the Bookmark and select Add Pages from there. 

By selecting on Add Pages a box appears. Here, you can click on the Save button after giving a title for the bookmark and pasting the special code on the URL section.

Javascript to add is given below:

javascript:var a = document.getElementsByTagName(‘a’), arr = ”;for(var i=0; i<a.length; i++) if (a[i].ping && !a[i].href.includes(‘google’))arr +=(‘<p>’ + a[i].href + ‘</p>’);var newWindow = window.open();newWindow.document.write(arr);newWindow.document.close();

Final Touch

After this, you may get all the URLs of the result page one by one in a single sheet. This makes your work easier compared to the manual checking.

Conclusion

While checking the summary of the article, the very first thing you need to do is to remove the pages from the website. Then, it needs to be also removed from the Google search console.  

Here from the bookmarked sheet, you can select the URL and remove it one by one using the search console. As it can be only performed as one by one, it consumes a lot of time and makes it a tough task. 

It is the only method on how you can remove the hacked URLs from the Google index. So, if your webpage is hacked by any sources, you can remove these affected URLs using this method.

Aviv Digital is the leading institute providing Digital Marketing course in Calicut. We offer a wide range of globally recognized certification programs which include SEO, SEM, SMM, Email Marketing and Inbound marketing course. We are an established institute with other branches offering SEO training in Cochin, Delhi, etc. For more details, Contact us at +91 8156998844.