diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java
index df03d1175cb14e1d072df7f3eb0649473bf1d2b6..014346e3767002a35cf441bd4f1532fa093961cd 100644
--- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java
+++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java
@@ -57,18 +57,18 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
 	/**
 	 * Homepage of drugbank.
 	 */
-	static final String							URL															= "http://ctdbase.org/";
+	static final String							URL															= "https://ctdbase.org/";
 
 	/**
 	 * URL to get a list of chemicals by disease id.
 	 */
-	public static final String			DISEASE_URL											= "http://ctdbase.org/detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
+	public static final String			DISEASE_URL											= "https://ctdbase.org/detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
 			+ "type=disease&acc=MESH%3A";
 
 	/**
 	 * URL to get a list of chemicals by gene id.
 	 */
-	public static final String			DISEASE_GENE_URL								= "http://ctdbase.org/detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
+	public static final String			DISEASE_GENE_URL								= "https://ctdbase.org/detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
 			+ "d-1332398-e=5&view=disease&type=gene&assnType=curated&acc=";
 
 	/**
@@ -218,7 +218,7 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
 				}
 			}
 
-		} catch (FileNotFoundException e) {
+		} catch (WrongResponseCodeIOException e) {
 			// it means that there are no results for this query
 		} catch (IOException e) {
 			throw new ChemicalSearchException("ctdbase service unavailable", e);
@@ -447,14 +447,14 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
 				if (entrez == null) {
 					invalidHgnc.add(md);
 				} else {
-					String query = "http://ctdbase.org/detail.go?type=gene&view=ixn&chemAcc=" + chemID.getResource() + "&acc=" + entrez.getResource();
+					String query = "https://ctdbase.org/detail.go?type=gene&view=ixn&chemAcc=" + chemID.getResource() + "&acc=" + entrez.getResource();
 					String referencesPage = getWebPageContent(query);
 					Matcher matcher = pattern.matcher(referencesPage);
 					while (matcher.find()) {
 						idx.add(matcher.group(1));
 					}
 					for (String string : idx) {
-						String query2 = "http://ctdbase.org/detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId=" + string;
+						String query2 = "https://ctdbase.org/detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId=" + string;
 						String referencesPage2 = getWebPageContent(query2);
 						String[] lines = referencesPage2.split("\n");
 						for (int i = 1; i < lines.length; i++) {
diff --git a/annotation/src/test/java/lcsb/mapviewer/annotation/services/ChemicalParserTest.java b/annotation/src/test/java/lcsb/mapviewer/annotation/services/ChemicalParserTest.java
index f03eb92e179fd32c00e3ac5686e069374d0d8a32..38fa0393ed9e2677e5b5c76870cff9bfc3b8bba8 100644
--- a/annotation/src/test/java/lcsb/mapviewer/annotation/services/ChemicalParserTest.java
+++ b/annotation/src/test/java/lcsb/mapviewer/annotation/services/ChemicalParserTest.java
@@ -551,7 +551,7 @@ public class ChemicalParserTest extends AnnotationTestFunctions {
 			// remove info about single publication from cache (so we will have to
 			// download it)
 			chemicalParser.getCache().removeByQuery(
-					"http://ctdbase.org/detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId=4802115", chemicalParser.getCacheType());
+					"https://ctdbase.org/detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId=4802115", chemicalParser.getCacheType());
 
 			// disallow to use cache for first query (it will be directly about drug),
 			// so parser will have to parse results taking data from cache (or