diff --git a/ztp-root/bootstrap/bootstrap b/ztp-root/bootstrap/bootstrap
index 9e8d2cf4d30ee4933c82c2adc6fe7dc563d76ec4..36f415d6618db6887bcd6cb45d9132b7725eed1d 100644
--- a/ztp-root/bootstrap/bootstrap
+++ b/ztp-root/bootstrap/bootstrap
@@ -24,6 +24,7 @@ def write_config(file_content):
 def main():
     mac_address = get_mac()
     parsed_mac = mac_address.replace(":", "")
+    parsed_mac = parsed_mac.replace("\n", "")
     url_with_config = HTTP_SERVER_CONFIG_BASE_URL + parsed_mac + "/startup-config"
     startup_config = get_config(url_with_config)
     write_config(startup_config)