<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Secure Your Laravel Website: A Guide on How to Force Redirect HTTP to HTTPS for Better SEO]]></title><description><![CDATA[<p dir="auto">In this article, i'll explain how to redirect HTTP to HTTPS in Laravel. Whether you're using Laravel 6, 7, 8, 9 or 10 we've got you covered!</p>
<p dir="auto">We have to modify AppServiceProvider boot method, i also disable HTTPS redirect in local.</p>
<p dir="auto">in app/Providers/AppServiceProvider.php.</p>
<pre><code class="language-php">&lt;?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Pagination\Paginator;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {

    }
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        if ($this-&gt;app-&gt;environment('production')) {
             \URL::forceScheme('https');
        }

        Paginator::useBootstrap();
    }
}
</code></pre>
]]></description><link>https://lankadevelopers.lk/topic/961/secure-your-laravel-website-a-guide-on-how-to-force-redirect-http-to-https-for-better-seo</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 05:53:46 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/961.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Mar 2023 00:06:40 GMT</pubDate><ttl>60</ttl></channel></rss>