You’re using Bootstrap class to horizontally center the box:
<div class="row d-flex justify-content-center">
I’m not familliar with Bootstrap, but if there is a class for that justify (row wise), there should also be a class to add for align (column wise),
maybe like: “align-items-center” in the avaiable container space (“h-100”).
To do it the bootstrap way you would need to set the html and body to height:100% and then ensure that .container and .row have the h-100 class added. Then in order to center in the viewport you would add the align-content-center class mentioned by Erik.
Here’s a working example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Redirect</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<style>
html,body{height:100%}
</style>
</head>
<body>
<div class="container h-100">
<div class="row d-flex justify-content-center align-content-center h-100">
<div class="col-6 mx-auto">
<div class="jumbotron">
<h5 class="display-5">User have been created</h5>
<p class="lead">Thank you for making an account to our site.</p>
</div>
</div>
</div>
</div>
</body>
</html>
You could of course not touch the css and add the h-100 class to the html and body elements if you don’t wish to change them globally.
e.g.
<!DOCTYPE html>
<html lang="en" class="h-100">
<head>
<title>Redirect</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body class="h-100">
<div class="container h-100">
<div class="row d-flex justify-content-center align-content-center h-100">
<div class="col-6 mx-auto">
<div class="jumbotron">
<h5 class="display-5">User have been created</h5>
<p class="lead">Thank you for making an account to our site.</p>
</div>
</div>
</div>
</div>
</body>
</html>
If you didn’t want to set the html and body to height:100% you could instead add a new class of your own making to .container and set it to height:100vh (vh =viewport height and doesn’t need an unbroken chain of heights back to root) and then remember remove the h-100 class from .container.
The absolute method mentioned in the post above will also work fine but of course takes everything out of the flow if indeed you did want following content.
Lastly remember not to directly change the behaviour of the bootstrap classes because the whole bootstrap grid system is based on these classes and if you change one then the whole grid could be affected. Use a new class name of your own making when you want to modify the behaviour of an existing element in isolated cases.